2018-11-30 19:52:05 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2018-06-13 17:43:48 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2019-10-02 16:46:03 +00:00
|
|
|
#include "ValidationError.h"
|
2018-06-13 17:43:48 +00:00
|
|
|
#include "Device.h"
|
2020-11-16 19:57:04 +00:00
|
|
|
#include "mozilla/dom/WebGPUBinding.h"
|
2018-06-13 17:43:48 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace webgpu {
|
|
|
|
|
2019-10-02 16:46:03 +00:00
|
|
|
GPU_IMPL_CYCLE_COLLECTION(ValidationError, mParent)
|
|
|
|
GPU_IMPL_JS_WRAP(ValidationError)
|
2018-06-13 17:43:48 +00:00
|
|
|
|
2020-12-18 20:07:47 +00:00
|
|
|
ValidationError::ValidationError(Device* aParent, const nsACString& aMessage)
|
|
|
|
: ChildOf(aParent), mMessage(aMessage) {}
|
|
|
|
|
2019-10-02 16:46:03 +00:00
|
|
|
ValidationError::~ValidationError() = default;
|
2018-06-13 17:43:48 +00:00
|
|
|
|
2020-12-18 20:07:47 +00:00
|
|
|
already_AddRefed<ValidationError> ValidationError::Constructor(
|
|
|
|
const dom::GlobalObject& aGlobal, const nsAString& aString) {
|
|
|
|
MOZ_CRASH("TODO");
|
|
|
|
}
|
|
|
|
|
|
|
|
void ValidationError::GetMessage(nsAString& aMessage) const {
|
|
|
|
CopyUTF8toUTF16(mMessage, aMessage);
|
|
|
|
}
|
|
|
|
|
2018-06-13 17:43:48 +00:00
|
|
|
} // namespace webgpu
|
|
|
|
} // namespace mozilla
|