Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: Return false in [[PreventExtensions]] for variable length TypedArrays #3453

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

syg
Copy link
Contributor

@syg syg commented Oct 18, 2024

Fixes #3385

@syg syg added normative change Affects behavior required to correctly evaluate some ECMAScript source text has consensus This has committee consensus. labels Oct 18, 2024
@syg syg requested a review from a team October 18, 2024 19:24
@syg
Copy link
Contributor Author

syg commented Oct 18, 2024

Doesn't have test262 tests yet at time of this comment.

spec.html Outdated Show resolved Hide resolved
@anba
Copy link
Contributor

anba commented Oct 18, 2024

https://tc39.es/ecma262/#sec-typedarray-exotic-objects and https://tc39.es/ecma262/#sec-typedarraycreate need to be updated to mention the new [[PreventExtensions]] override.

@syg syg added the needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 label Oct 18, 2024
spec.html Outdated Show resolved Hide resolved
spec.html Outdated
@@ -41830,6 +41844,22 @@ <h1>
1. Return ~unused~.
</emu-alg>
</emu-clause>

<emu-clause id="sec-isfixedlengthtypedarray" type="abstract operation">
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put this up with IsTypedArrayOutOfBounds. This section is only really for the initialization-related AOs.

Also since this takes a TA, it should be IsTypedArrayFixedLength: it asks a question about a TA, rather than determining whether an arbitrary object is a fixed-length TA.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, moving it sounds good.

Re: IsTypedArrayFixedLength name, this was to be consistent with IsFixedLengthArrayBuffer. We can change both though as a followup, I have no issue with your suggestion.

syg added a commit to syg/test262 that referenced this pull request Nov 13, 2024
Object.freeze will always throw on variable-length TAs with this
has-consensus PR: tc39/ecma262#3453
hubot pushed a commit to v8/v8 that referenced this pull request Nov 13, 2024
This is a spec normative change: tc39/ecma262#3453

Fixed: 374310073
Change-Id: I085260fea077bc27cf1e4f06d4389519e12c4e14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6014979
Commit-Queue: Shu-yu Guo <[email protected]>
Auto-Submit: Shu-yu Guo <[email protected]>
Commit-Queue: Rezvan Mahdavi Hezaveh <[email protected]>
Reviewed-by: Rezvan Mahdavi Hezaveh <[email protected]>
Cr-Commit-Position: refs/heads/main@{#97166}
test262-pr-bot pushed a commit to tc39/test262 that referenced this pull request Nov 13, 2024
This is a spec normative change: tc39/ecma262#3453

Fixed: 374310073
Change-Id: I085260fea077bc27cf1e4f06d4389519e12c4e14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6014979
Commit-Queue: Shu-yu Guo <[email protected]>
Auto-Submit: Shu-yu Guo <[email protected]>
Commit-Queue: Rezvan Mahdavi Hezaveh <[email protected]>
Reviewed-by: Rezvan Mahdavi Hezaveh <[email protected]>
Cr-Commit-Position: refs/heads/main@{#97166}
test262-merge-bot pushed a commit to tc39/test262 that referenced this pull request Nov 13, 2024
This is a spec normative change: tc39/ecma262#3453

Fixed: 374310073
Change-Id: I085260fea077bc27cf1e4f06d4389519e12c4e14
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6014979
Commit-Queue: Shu-yu Guo <[email protected]>
Auto-Submit: Shu-yu Guo <[email protected]>
Commit-Queue: Rezvan Mahdavi Hezaveh <[email protected]>
Reviewed-by: Rezvan Mahdavi Hezaveh <[email protected]>
Cr-Commit-Position: refs/heads/main@{#97166}
@syg syg added has test262 tests and removed needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 labels Nov 13, 2024
@syg syg added the editor call to be discussed in the next editor call label Nov 20, 2024
@bakkot bakkot added ready to merge Editors believe this PR needs no further reviews, and is ready to land. and removed editor call to be discussed in the next editor call labels Nov 20, 2024
@ljharb ljharb merged commit c1040ff into tc39:main Nov 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus. has test262 tests normative change Affects behavior required to correctly evaluate some ECMAScript source text ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypedArray exotic objects need [[PreventExtensions]]
5 participants