Commit 20b3faef authored by Corentin Wallez's avatar Corentin Wallez Committed by Commit Bot

GPUBuffer: RangeError on getMappedRange too big for ArrayBuffer

Bug: dawn:455
Change-Id: Iaa5e5baf06de4e255b29f3c1a23a103ae8e00320
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2493380
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: default avatarKai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823310}
parent d887226e
...@@ -196,9 +196,9 @@ DOMArrayBuffer* GPUBuffer::GetMappedRangeImpl(uint64_t offset, ...@@ -196,9 +196,9 @@ DOMArrayBuffer* GPUBuffer::GetMappedRangeImpl(uint64_t offset,
// This could eventually be upgrade to the max ArrayBuffer size instead of the // This could eventually be upgrade to the max ArrayBuffer size instead of the
// max TypedArray size. See crbug.com/951196 // max TypedArray size. See crbug.com/951196
if (range_size > v8::TypedArray::kMaxLength) { if (range_size > v8::TypedArray::kMaxLength) {
exception_state.ThrowDOMException( exception_state.ThrowRangeError(
DOMExceptionCode::kOperationError,
"getMappedRange failed, size is too large for the implementation"); "getMappedRange failed, size is too large for the implementation");
return nullptr;
} }
if (range_size > std::numeric_limits<size_t>::max() - range_offset) { if (range_size > std::numeric_limits<size_t>::max() - range_offset) {
......
...@@ -52,9 +52,6 @@ crbug.com/1083478 [ Win ] wpt_internal/webgpu/webgpu/web-platform/reftests/canva ...@@ -52,9 +52,6 @@ crbug.com/1083478 [ Win ] wpt_internal/webgpu/webgpu/web-platform/reftests/canva
crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setViewport:* [ Failure ] crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setViewport:* [ Failure ]
crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setScissorRect:* [ Failure ] crbug.com/dawn/542 wpt_internal/webgpu/cts.html?q=webgpu:api,validation,setScissorRect:* [ Failure ]
# This test should be updated to expect an OperationError instead of a RangeError
crbug.com/dawn/445 wpt_internal/webgpu/cts.html?q=webgpu:api,operation,buffers,map_oom:mappedAtCreation:* [ Failure ]
# #
# Platform-independent failures # Platform-independent failures
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment