Skip to content

Commit de34cd8

Browse files
committed
Have ValidateIntegerTypedArray use ValidateTypedArray; move [[ArrayLength]] use before possible detach point
1 parent 598dae6 commit de34cd8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

spec.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37691,15 +37691,13 @@ <h1>ValidateIntegerTypedArray ( _typedArray_ [ , _waitable_ ] )</h1>
3769137691
<p>The abstract operation ValidateIntegerTypedArray takes argument _typedArray_ and optional argument _waitable_ (a Boolean). It performs the following steps when called:</p>
3769237692
<emu-alg>
3769337693
1. If _waitable_ is not present, set _waitable_ to *false*.
37694-
1. Perform ? RequireInternalSlot(_typedArray_, [[TypedArrayName]]).
37694+
1. Let _buffer_ be ? ValidateTypedArray(_typedArray_).
3769537695
1. Let _typeName_ be _typedArray_.[[TypedArrayName]].
3769637696
1. Let _type_ be the Element Type value in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _typeName_.
3769737697
1. If _waitable_ is *true*, then
3769837698
1. If _typeName_ is not *"Int32Array"* or *"BigInt64Array"*, throw a *TypeError* exception.
3769937699
1. Else,
3770037700
1. If ! IsUnclampedIntegerElementType(_type_) is *false* and ! IsBigIntElementType(_type_) is *false*, throw a *TypeError* exception.
37701-
1. Assert: _typedArray_ has a [[ViewedArrayBuffer]] internal slot.
37702-
1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]].
3770337701
1. Return _buffer_.
3770437702
</emu-alg>
3770537703
</emu-clause>
@@ -37709,9 +37707,8 @@ <h1>ValidateAtomicAccess ( _typedArray_, _requestIndex_ )</h1>
3770937707
<p>The abstract operation ValidateAtomicAccess takes arguments _typedArray_ and _requestIndex_. It performs the following steps when called:</p>
3771037708
<emu-alg>
3771137709
1. Assert: _typedArray_ is an Object that has a [[ViewedArrayBuffer]] internal slot.
37712-
1. Let _accessIndex_ be ? ToIndex(_requestIndex_).
37713-
1. If IsDetachedBuffer(_typedArray_.[[ViewedArrayBuffer]]) is *true*, throw a *TypeError* exception.
3771437710
1. Let _length_ be _typedArray_.[[ArrayLength]].
37711+
1. Let _accessIndex_ be ? ToIndex(_requestIndex_).
3771537712
1. Assert: _accessIndex_ &ge; 0.
3771637713
1. If _accessIndex_ &ge; _length_, throw a *RangeError* exception.
3771737714
1. Return _accessIndex_.

0 commit comments

Comments
 (0)