Bug 1842020: fix(webgpu): s/AbortError/RangeError on OOM in `GPUDevice.createBuffer` r=webgpu-reviewers,nical

Depends on D181691

Differential Revision: https://phabricator.services.mozilla.com/D182909
This commit is contained in:
Erich Gubler 2023-07-07 16:43:32 +00:00
Родитель 040bbdb18d
Коммит 1f2b372ff7
2 изменённых файлов: 1 добавлений и 13 удалений

Просмотреть файл

@ -81,7 +81,7 @@ already_AddRefed<Buffer> Buffer::Create(Device* aDevice, RawId aDeviceId,
auto maybeShmem = ipc::UnsafeSharedMemoryHandle::CreateAndMap(size);
if (maybeShmem.isNothing()) {
aRv.ThrowAbortError(
aRv.ThrowRangeError(
nsPrintfCString("Unable to allocate shmem of size %" PRIuPTR, size));
return nullptr;
}

Просмотреть файл

@ -27,18 +27,6 @@
[cts.https.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation:*]
[:oom=true;size=9007199254740984]
expected:
# See <https://bugzilla.mozilla.org/show_bug.cgi?id=1842020>.
if bits == 64: FAIL
PASS
[:oom=true;size=137438953472]
expected:
# See <https://bugzilla.mozilla.org/show_bug.cgi?id=1842020>.
if bits == 64: FAIL
PASS
[cts.https.html?q=webgpu:api,operation,buffers,map:mappedAtCreation,mapState:*]
[:validationError=true;afterUnmap=false;afterDestroy=true]