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

Editorial: Validate array length using SameValueZero in ArraySetLength and Array #2460

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -13728,7 +13728,7 @@ <h1>
1. Let _newLenDesc_ be a copy of _Desc_.
1. [id="step-arraysetlength-newlen"] Let _newLen_ be ? ToUint32(_Desc_.[[Value]]).
1. [id="step-arraysetlength-numberlen"] Let _numberLen_ be ? ToNumber(_Desc_.[[Value]]).
1. If _newLen_ is not the same value as _numberLen_, throw a *RangeError* exception.
1. If SameValueZero(_newLen_, _numberLen_) is *false*, throw a *RangeError* exception.
1. Set _newLenDesc_.[[Value]] to _newLen_.
1. Let _oldLenDesc_ be OrdinaryGetOwnProperty(_A_, *"length"*).
1. Assert: ! IsDataDescriptor(_oldLenDesc_) is *true*.
Expand Down Expand Up @@ -35206,7 +35206,7 @@ <h1>Array ( ..._values_ )</h1>
1. Let _intLen_ be *1*<sub>𝔽</sub>.
1. Else,
1. Let _intLen_ be ! ToUint32(_len_).
1. If _intLen_ is not the same value as _len_, throw a *RangeError* exception.
1. If SameValueZero(_intLen_, _len_) is *false*, throw a *RangeError* exception.
1. Perform ! Set(_array_, *"length"*, _intLen_, *true*).
1. Return _array_.
1. Else,
Expand Down