mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1838739 - Initialize result of SetAsGPUOutOfMemoryError. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D181161
This commit is contained in:
parent
f3e0985c12
commit
f2bc14357b
@ -18,6 +18,7 @@
|
||||
#include "Buffer.h"
|
||||
#include "ComputePipeline.h"
|
||||
#include "DeviceLostInfo.h"
|
||||
#include "OutOfMemoryError.h"
|
||||
#include "PipelineLayout.h"
|
||||
#include "Queue.h"
|
||||
#include "RenderBundleEncoder.h"
|
||||
@ -376,7 +377,7 @@ already_AddRefed<dom::Promise> Device::PopErrorScope(ErrorResult& aRv) {
|
||||
return;
|
||||
|
||||
case PopErrorScopeResultType::OutOfMemory:
|
||||
error.SetAsGPUOutOfMemoryError();
|
||||
error.SetAsGPUOutOfMemoryError() = new OutOfMemoryError(self);
|
||||
break;
|
||||
|
||||
case PopErrorScopeResultType::ValidationError:
|
||||
|
@ -20,13 +20,13 @@ class OutOfMemoryError final : public nsWrapperCache, public ChildOf<Device> {
|
||||
public:
|
||||
GPU_DECL_CYCLE_COLLECTION(OutOfMemoryError)
|
||||
GPU_DECL_JS_WRAP(OutOfMemoryError)
|
||||
OutOfMemoryError() = delete;
|
||||
|
||||
explicit OutOfMemoryError(const RefPtr<Device>& aParent)
|
||||
: ChildOf<Device>(aParent) {}
|
||||
|
||||
private:
|
||||
virtual ~OutOfMemoryError();
|
||||
void Cleanup() {}
|
||||
|
||||
public:
|
||||
};
|
||||
|
||||
} // namespace webgpu
|
||||
|
Loading…
Reference in New Issue
Block a user