Skip to content

[immutable-arraybuffer] Coverage for read-only TypedArray methods#4547

Merged
gibson042 merged 5 commits into
tc39:mainfrom
gibson042:2025-07-immutable-arraybuffer-typedarray-methods-readonly
May 17, 2026
Merged

[immutable-arraybuffer] Coverage for read-only TypedArray methods#4547
gibson042 merged 5 commits into
tc39:mainfrom
gibson042:2025-07-immutable-arraybuffer-typedarray-methods-readonly

Conversation

@gibson042

@gibson042 gibson042 commented Jul 23, 2025

Copy link
Copy Markdown
Member

Ref #4509

%TypedArray%.prototype properties

  • read-only %TypedArray%.prototype properties
    • work as expected if the receiver is backed by an immutable ArrayBuffer
    • %TypedArray%.prototype.filter throws a TypeError if the receiver constructs an instance backed by an immutable ArrayBuffer, after determining contents
    • %TypedArray%.prototype.map throws a TypeError if the receiver constructs an instance backed by an immutable ArrayBuffer, after validating that callback is callable but before invoking it
    • %TypedArray%.prototype.slice throws a TypeError if the receiver constructs an instance backed by an immutable ArrayBuffer, after coercing bounds

Note that the "Cover existing read-only TypedArray methods" commit is large but mostly mechanical, the others are small and actually specific to immutable ArrayBuffer.

@gibson042
gibson042 requested a review from a team as a code owner July 23, 2025 19:21
@gibson042
gibson042 force-pushed the 2025-07-immutable-arraybuffer-typedarray-methods-readonly branch 3 times, most recently from 504e309 to 97ab546 Compare July 23, 2025 21:31
@ptomato
ptomato force-pushed the 2025-07-immutable-arraybuffer-typedarray-methods-readonly branch from 97ab546 to b283db3 Compare August 25, 2025 22:30
@gibson042
gibson042 force-pushed the 2025-07-immutable-arraybuffer-typedarray-methods-readonly branch 2 times, most recently from c56cecc to bf50c61 Compare May 8, 2026 14:52
@gibson042
gibson042 requested review from iamstolis and ptomato and removed request for iamstolis May 8, 2026 14:54

@ptomato ptomato left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did only skim the large commit, but the newly added tests look correct to me. Don't forget to autosquash before merging.

@gibson042
gibson042 force-pushed the 2025-07-immutable-arraybuffer-typedarray-methods-readonly branch from bf50c61 to 9e07366 Compare May 17, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants