diff --git a/docs/index.html b/docs/index.html
index 5c0700a..f6fd7b6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -12,7 +12,7 @@
Stage 3 Draft / February 2, 2023
+ Stage 3 Draft / June 27, 2023
Resizable ArrayBuffer and growable SharedArrayBuffer
We extend the ArrayBuffer
and SharedArrayBuffer
constructors to take an additional maximum byte length, which would construct dynamically resizable and growable array buffers, respectively.
@@ -127,7 +127,7 @@ 1.3.4 ArrayBuffer.prototype.slice ( start
1.3.5 ArrayBuffer.prototype.resize ( newLength )
The following steps are taken:
- - Let O be the this value.
- Perform ? RequireInternalSlot(O, [[ArrayBufferMaxByteLength]]).
- If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
- If IsDetachedBuffer(O) is true, throw a TypeError exception.
- Let newByteLength be ? ToIntegerOrInfinity(newLength).
- If newByteLength < 0 or newByteLength > O.[[ArrayBufferMaxByteLength]], throw a RangeError exception.
- Let hostHandled be ? HostResizeArrayBuffer(O, newByteLength).
- If hostHandled is handled, return undefined.
- Let oldBlock be O.[[ArrayBufferData]].
- Let newBlock be ? CreateByteDataBlock(newByteLength).
- Let copyLength be min(newByteLength, O.[[ArrayBufferByteLength]]).
- Perform CopyDataBlockBytes(newBlock, 0, oldBlock, 0, copyLength).
- NOTE: Neither creation of the new Data Block nor copying from the old Data Block are observable. Implementations reserve the right to implement this method as in-place growth or shrinkage.
- Set O.[[ArrayBufferData]] to newBlock.
- Set O.[[ArrayBufferByteLength]] to newLength.
- Return undefined.
+ - Let O be the this value.
- Perform ? RequireInternalSlot(O, [[ArrayBufferMaxByteLength]]).
- If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
- Let newByteLength be ? ToIntegerOrInfinity(newLength).
- If IsDetachedBuffer(O) is true, throw a TypeError exception.
- If newByteLength < 0 or newByteLength > O.[[ArrayBufferMaxByteLength]], throw a RangeError exception.
- Let hostHandled be ? HostResizeArrayBuffer(O, newByteLength).
- If hostHandled is handled, return undefined.
- Let oldBlock be O.[[ArrayBufferData]].
- Let newBlock be ? CreateByteDataBlock(newByteLength).
- Let copyLength be min(newByteLength, O.[[ArrayBufferByteLength]]).
- Perform CopyDataBlockBytes(newBlock, 0, oldBlock, 0, copyLength).
- NOTE: Neither creation of the new Data Block nor copying from the old Data Block are observable. Implementations reserve the right to implement this method as in-place growth or shrinkage.
- Set O.[[ArrayBufferData]] to newBlock.
- Set O.[[ArrayBufferByteLength]] to newLength.
- Return undefined.
diff --git a/spec.html b/spec.html
index 80779d9..b4ce530 100644
--- a/spec.html
+++ b/spec.html
@@ -273,8 +273,8 @@ ArrayBuffer.prototype.resize ( _newLength_ )
1. Let _O_ be the *this* value.
1. Perform ? RequireInternalSlot(_O_, [[ArrayBufferMaxByteLength]]).
1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception.
- 1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception.
1. Let _newByteLength_ be ? ToIntegerOrInfinity(_newLength_).
+ 1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception.
1. If _newByteLength_ < 0 or _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception.
1. Let _hostHandled_ be ? HostResizeArrayBuffer(_O_, _newByteLength_).
1. If _hostHandled_ is ~handled~, return *undefined*.