Repository navigation
runtime/binary-data: complete ArrayBuffer/DataView view semantics - #4041
Merged
proggeramlug merged 2 commits intoJun 2, 2026
Merged
Conversation
proggeramlug
added a commit
that referenced
this pull request
Jun 2, 2026
#3961) (#4048) * test(buffer): lock Uint8Array.prototype.buffer ArrayBuffer return type (#3961) * ci(file-size): allowlist object/mod.rs trunk (2 LOC over after #4039-#4041) The #1103 object.rs split trunk crossed the 2000-line gate on current main; splitting the cache/root-scanner groups into siblings is tracked under #1435. Matches the existing global_this/field_get_set/class_registry allowlist precedent. Unblocks lint for all PRs. --------- Co-authored-by: Ralph Küpper <ralph@skelpo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4033 by filling the ordinary ArrayBuffer/DataView semantics needed by binary-heavy packages:
ArrayBuffer/SharedArrayBufferconstructor length coercion so huge or negative sizes throwRangeErrorbefore truncation/allocationArrayBuffer.isViewas a real callable static and support value extraction (const isView = ArrayBuffer.isView)ArrayBuffer.prototype.byteLengthas an accessor with brand checks and descriptor metadataDataViewinstances distinct from their backingArrayBufferwhile preserving view registry write propagationArrayBuffer.isView/util.types.isArrayBufferViewDeepWiki
Required reference saved at:
target/deepwiki/arraybuffer-dataview-semantics.mdQueried
boa-dev/boafor ArrayBuffer constructor/prototype/static surface,ArrayBuffer.isView, DataView internal slot/subclass recognition, byteLength getter descriptors/brand checks, slice bounds/defaults, and avoiding SharedArrayBuffer/resizable scope creep.Evidence
Base SHA:
132fb26cf461eced3da6bc86e04f680557c49400Commit:
bbf96e3e3Issue baseline for the requested subset was:
pass=40 runtime-fail=40 parity=50.0%After this change:
Focused smoke covered representative #4033 failures:
RangeErrortypeof ArrayBuffer.isView === "function"const isView = ArrayBuffer.isViewis callableArrayBuffer.isView(new DataView(ab)) === trueArrayBuffer.isView(new (class extends DataView {})(ab)) === trueArrayBuffer.isView(ab) === falseArrayBuffer.prototype.byteLengthdescriptor/getter/brand checks workab.slice(1).byteLength === 3Additional commands run:
Residual risks