Skip to content

Editorial: note that TA.prototype.subarray can be customized by Symbol.species - #4057

Open
bakkot wants to merge 2 commits into
tc39:mainfrom
bakkot:fix-ta-subarray-note
Open

bakkot wants to merge 2 commits into
tc39:mainfrom
bakkot:fix-ta-subarray-note

Conversation

@bakkot

@bakkot bakkot commented Oct 30, 2026

Copy link
Copy Markdown
Member

This addresses the issue identified in #4014 by @JinDX, but I wrote my own wording that I prefer.

I considered leaving out this detail, especially in light of #3450, but since it has potential security implementations if different parts of an implementation make different assumptions here it seemed worth including. I originally tried to enumerate how it could change the behavior but doing so precisely makes it pretty wordy so I didn't bother.

@linusg linusg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I find this note of limited value, all other TA builtins using TypedArraySpeciesCreate omit it.

@github-actions

Copy link
Copy Markdown

The rendered spec preview for this PR is available as a single page at https://tc39.es/ecma262/pr/4057 and as multiple pages at https://tc39.es/ecma262/pr/4057/multipage .

@bakkot

bakkot commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

all other TA builtins using TypedArraySpeciesCreate omit it

None of the other such builtins have descriptions at all; it's only this one where there is a description that could be (and is) rendered incorrect by the absence of this note.

@linusg

linusg commented Oct 30, 2026

Copy link
Copy Markdown
Member

Yes, poor wording on my part. This change is correct, but I don't think the note is all that useful to begin with (or should be mirrored to the other methods if anyone disagrees). Separate change though.

Comment thread spec.html Resolved

This branch has not been deployed

No deployments
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