Bug 1732219 - Add API for fetching the preview image. r=geckoview-reviewers,agi,mconley
[gecko.git] / dom / webgpu / ValidationError.cpp
blob287326dab0524600d37375a01cebbd499293ccc7
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/. */
6 #include "ValidationError.h"
7 #include "Device.h"
8 #include "mozilla/dom/WebGPUBinding.h"
10 namespace mozilla {
11 namespace webgpu {
13 GPU_IMPL_CYCLE_COLLECTION(ValidationError, mParent)
14 GPU_IMPL_JS_WRAP(ValidationError)
16 ValidationError::ValidationError(Device* aParent, const nsACString& aMessage)
17 : ChildOf(aParent), mMessage(aMessage) {}
19 ValidationError::~ValidationError() = default;
21 already_AddRefed<ValidationError> ValidationError::Constructor(
22 const dom::GlobalObject& aGlobal, const nsAString& aString) {
23 MOZ_CRASH("TODO");
26 void ValidationError::GetMessage(nsAString& aMessage) const {
27 CopyUTF8toUTF16(mMessage, aMessage);
30 } // namespace webgpu
31 } // namespace mozilla