Backed out 4 changesets (bug 1825722) for causing reftest failures CLOSED TREE
[gecko.git] / dom / webgpu / OutOfMemoryError.h
blob3af96f9d2b7024cbd7607e21540fe637ba8ead5e
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 #ifndef GPU_OutOfMemoryError_H_
7 #define GPU_OutOfMemoryError_H_
9 #include "Error.h"
11 namespace mozilla {
12 class ErrorResult;
13 namespace dom {
14 class GlobalObject;
15 } // namespace dom
16 namespace webgpu {
18 class OutOfMemoryError final : public Error {
19 public:
20 GPU_DECL_JS_WRAP(OutOfMemoryError)
22 OutOfMemoryError(nsIGlobalObject* const aGlobal, const nsAString& aMessage)
23 : Error(aGlobal, aMessage) {}
25 OutOfMemoryError(nsIGlobalObject* const aGlobal, const nsACString& aMessage)
26 : Error(aGlobal, aMessage) {}
28 private:
29 ~OutOfMemoryError() override = default;
31 public:
32 static already_AddRefed<OutOfMemoryError> Constructor(
33 const dom::GlobalObject& aGlobal, const nsAString& aString,
34 ErrorResult& aRv);
37 } // namespace webgpu
38 } // namespace mozilla
40 #endif // GPU_OutOfMemoryError_H_