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 "mozilla/dom/WebGPUBinding.h"
9 namespace mozilla::webgpu
{
11 GPU_IMPL_JS_WRAP(ValidationError
)
13 already_AddRefed
<ValidationError
> ValidationError::Constructor(
14 const dom::GlobalObject
& aGlobal
, const nsAString
& aString
,
16 nsCOMPtr
<nsIGlobalObject
> global
= do_QueryInterface(aGlobal
.GetAsSupports());
17 MOZ_RELEASE_ASSERT(global
);
18 return MakeAndAddRef
<ValidationError
>(global
, aString
);
21 } // namespace mozilla::webgpu