@@ -42806,9 +42806,9 @@ <h1>ArrayBuffer.prototype.resize ( _newLength_ )</h1>
42806
42806
1. Let _O_ be the *this* value.
42807
42807
1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferMaxByteLength]]).
42808
42808
1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception.
42809
- 1. Let _newByteLength_ be ? ToIntegerOrInfinity (_newLength_).
42809
+ 1. Let _newByteLength_ be ? ToIndex (_newLength_).
42810
42810
1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception.
42811
- 1. If _newByteLength_ < 0 or _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception.
42811
+ 1. If _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception.
42812
42812
1. Let _hostHandled_ be ? HostResizeArrayBuffer(_O_, _newByteLength_).
42813
42813
1. If _hostHandled_ is ~handled~, return *undefined*.
42814
42814
1. Let _oldBlock_ be _O_.[[ArrayBufferData]].
@@ -43092,7 +43092,7 @@ <h1>SharedArrayBuffer.prototype.grow ( _newLength_ )</h1>
43092
43092
1. Let _O_ be the *this* value.
43093
43093
1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferMaxByteLength]]).
43094
43094
1. If IsSharedArrayBuffer(_O_) is *false*, throw a *TypeError* exception.
43095
- 1. Let _newByteLength_ be ? ToIntegerOrInfinity (_newLength_).
43095
+ 1. Let _newByteLength_ be ? ToIndex (_newLength_).
43096
43096
1. Let _hostHandled_ be ? HostGrowSharedArrayBuffer(_O_, _newByteLength_).
43097
43097
1. If _hostHandled_ is ~handled~, return *undefined*.
43098
43098
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
0 commit comments