Skip to content

Commit 45da401

Browse files
committed
Use ToIndex in grow and resize
1 parent 7ed2216 commit 45da401

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42806,9 +42806,9 @@ <h1>ArrayBuffer.prototype.resize ( _newLength_ )</h1>
4280642806
1. Let _O_ be the *this* value.
4280742807
1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferMaxByteLength]]).
4280842808
1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception.
42809-
1. Let _newByteLength_ be ? ToIntegerOrInfinity(_newLength_).
42809+
1. Let _newByteLength_ be ? ToIndex(_newLength_).
4281042810
1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception.
42811-
1. If _newByteLength_ &lt; 0 or _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception.
42811+
1. If _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception.
4281242812
1. Let _hostHandled_ be ? HostResizeArrayBuffer(_O_, _newByteLength_).
4281342813
1. If _hostHandled_ is ~handled~, return *undefined*.
4281442814
1. Let _oldBlock_ be _O_.[[ArrayBufferData]].
@@ -43092,7 +43092,7 @@ <h1>SharedArrayBuffer.prototype.grow ( _newLength_ )</h1>
4309243092
1. Let _O_ be the *this* value.
4309343093
1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferMaxByteLength]]).
4309443094
1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception.
43095-
1. Let _newByteLength_ be ? ToIntegerOrInfinity(_newLength_).
43095+
1. Let _newByteLength_ be ? ToIndex(_newLength_).
4309643096
1. Let _hostHandled_ be ? HostGrowSharedArrayBuffer(_O_, _newByteLength_).
4309743097
1. If _hostHandled_ is ~handled~, return *undefined*.
4309843098
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.

0 commit comments

Comments
 (0)