Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 575b7fa2016905586dc82337b53bd04065f094c5
https://github.com/WebKit/WebKit/commit/575b7fa2016905586dc82337b53bd04065f094c5
Author: Shu-yu Guo <[email protected]>
Date: 2026-07-20 (Mon, 20 Jul 2026)
Changed paths:
M JSTests/wasm/js-api/memory-toResizableBuffer.js
M Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp
M Source/JavaScriptCore/runtime/PageCount.h
Log Message:
-----------
[JSC] Wasm-backed resizable ArrayBuffers should throw for all invalid sizes
https://bugs.webkit.org/show_bug.cgi?id=319705
rdar://181293951
Reviewed by Mark Lam and Yusuke Suzuki.
Resizable ArrayBuffers that are backed by Wasm memories cannot grow beyond
65536 pages. Currently, we RELEASE_ASSERT when exceeding that max. This PR
fixes it to throw a RangeError instead.
Test: JSTests/wasm/js-api/memory-toResizableBuffer.js:
* JSTests/wasm/js-api/memory-toResizableBuffer.js:
(assertTrue):
* Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/PageCount.h:
(JSC::PageCount::fromBytes):
(JSC::PageCount::fromBytesUnchecked):
Canonical link: https://commits.webkit.org/317540@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications