CompilationMessage.cpp (1131B)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #include "CompilationMessage.h" 7 8 #include "CompilationInfo.h" 9 #include "mozilla/dom/WebGPUBinding.h" 10 11 namespace mozilla::webgpu { 12 13 GPU_IMPL_CYCLE_COLLECTION(CompilationMessage, mParent) 14 GPU_IMPL_JS_WRAP(CompilationMessage) 15 16 CompilationMessage::CompilationMessage(Device* const aParent, 17 dom::GPUCompilationMessageType aType, 18 uint64_t aLineNum, uint64_t aLinePos, 19 uint64_t aOffset, uint64_t aLength, 20 nsString&& aMessage) 21 : ChildOf(aParent), 22 mType(aType), 23 mLineNum(aLineNum), 24 mLinePos(aLinePos), 25 mOffset(aOffset), 26 mLength(aLength), 27 mMessage(std::move(aMessage)) {} 28 29 CompilationMessage::~CompilationMessage() = default; 30 31 } // namespace mozilla::webgpu