-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Swap side effect and check in TypedArray constructor #852
Merged
Conversation
This file contains 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
Previously, in one of the TypedArray constructor paths, an ArrayBuffer was checked for being detached, and then a ToIndex calculation is done. Because ToIndex may detach the ArrayBuffer itself, this patch moves the detached check to afterwards, so that it can include that possible time when the ArrayBuffer may be detached. Closes tc39#842
littledan
added
needs consensus
This needs committee consensus before it can be eligible to be merged.
needs test262 tests
The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262
normative change
Affects behavior required to correctly evaluate some ECMAScript source text
labels
Mar 18, 2017
@psmarshall Is this what you were thinking? |
littledan
added a commit
to littledan/test262
that referenced
this pull request
Mar 21, 2017
…th calculation This test is only valid with the PR in tc39/ecma262#852
Yes that looks good to me, thanks |
littledan
removed
the
needs test262 tests
The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262
label
Mar 22, 2017
this reached consensus in March 22nd at the last TC39 meeting. |
leobalter
removed
the
needs consensus
This needs committee consensus before it can be eligible to be merged.
label
Mar 27, 2017
leobalter
added a commit
to tc39/test262
that referenced
this pull request
Mar 27, 2017
* Tests for throwing a TypeError in the TypedArray constructor on a detached buffer Detached buffer causes an exception - If it's already detached going into the constructor - If the byteOffset coercion causes it to be detached Tests are valid in ES2017 * Test that TypedArray constructor throws when detaching buffer in length calculation This test is only valid with the PR in tc39/ecma262#852 * Rename files per review
Two questions:
|
|
littledan
added a commit
to littledan/test262
that referenced
this pull request
Apr 5, 2017
Bug was reported by @anba at tc39/ecma262#852 (comment) Without this change, you'd expect a RangeError rather than a TypeError.
leobalter
pushed a commit
to tc39/test262
that referenced
this pull request
Apr 6, 2017
Bug was reported by @anba at tc39/ecma262#852 (comment) Without this change, you'd expect a RangeError rather than a TypeError.
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
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.
Previously, in one of the TypedArray constructor paths, an ArrayBuffer
was checked for being detached, and then a ToIndex calculation is done.
Because ToIndex may detach the ArrayBuffer itself, this patch moves
the detached check to afterwards, so that it can include that possible
time when the ArrayBuffer may be detached.
Closes #842