ValidationError.cpp (776B)
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 "ValidationError.h" 7 8 #include "mozilla/dom/WebGPUBinding.h" 9 10 namespace mozilla::webgpu { 11 12 GPU_IMPL_JS_WRAP(ValidationError) 13 14 already_AddRefed<ValidationError> ValidationError::Constructor( 15 const dom::GlobalObject& aGlobal, const nsAString& aString, 16 ErrorResult& aRv) { 17 nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports()); 18 MOZ_RELEASE_ASSERT(global); 19 return MakeAndAddRef<ValidationError>(global, aString); 20 } 21 22 } // namespace mozilla::webgpu