Skip to content

Commit

Permalink
Fix description of new-length-excessive
Browse files Browse the repository at this point in the history
  • Loading branch information
syg authored and ljharb committed Mar 28, 2023
1 parent 6fecc44 commit 4a8135e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,8 @@
/*---
esid: sec-arraybuffer.prototype.transfer
description: >
Throws a RangeError the newLength value is too large to create a new
ArrayBuffer.
info: |
ArrayBuffer.prototype.transfer ( [ newLength ] )
1. Let O be the this value.
2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
3. If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
4. If IsDetachedBuffer(O) is true, throw a TypeError exception.
5. If newLength is undefined, let newByteLength be
O.[[ArrayBufferByteLength]].
6. Else, let newByteLength be ? ToIntegerOrInfinity(newLength).
7. Let new be ? Construct(%ArrayBuffer%, « 𝔽(newByteLength) »).
[...]
Throws a RangeError if the newLength is larger than 2^53 - 1 due to clamping
in ToIndex.
features: [resizable-arraybuffer, arraybuffer-transfer]
---*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,8 @@
/*---
esid: sec-arraybuffer.prototype.transfertofixedlength
description: >
Throws a RangeError the newLength value is too large to create a new
ArrayBuffer.
info: |
ArrayBuffer.prototype.transferToFixedLength ( [ newLength ] )
1. Let O be the this value.
2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
3. If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
4. If IsDetachedBuffer(O) is true, throw a TypeError exception.
5. If newLength is undefined, let newByteLength be
O.[[ArrayBufferByteLength]].
6. Else, let newByteLength be ? ToIntegerOrInfinity(newLength).
7. Let new be ? Construct(%ArrayBuffer%, « 𝔽(newByteLength) »).
[...]
Throws a RangeError if the newLength is larger than 2^53 - 1 due to clamping
in ToIndex.
features: [resizable-arraybuffer, arraybuffer-transfer]
---*/

Expand Down

0 comments on commit 4a8135e

Please sign in to comment.