Skip to content

Commit

Permalink
Editorial: Change ValidateTypedArray so that it doesn't return the bu…
Browse files Browse the repository at this point in the history
…ffer

See #2355 (comment)
  • Loading branch information
jmdyck committed Apr 8, 2021
1 parent 26061c0 commit b083b70
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -33807,7 +33807,8 @@ <h1>%TypedArray%.prototype.sort ( _comparefn_ )</h1>
<emu-alg>
1. If _comparefn_ is not *undefined* and IsCallable(_comparefn_) is *false*, throw a *TypeError* exception.
1. Let _obj_ be the *this* value.
1. Let _buffer_ be ? ValidateTypedArray(_obj_).
1. Perform ? ValidateTypedArray(_obj_).
1. Let _buffer_ be _obj_.[[ViewedArrayBuffer]].
1. Let _len_ be _obj_.[[ArrayLength]].
</emu-alg>
<p>The following version of SortCompare is used by %TypedArray%`.prototype.sort`. It performs a numeric comparison rather than the string comparison used in <emu-xref href="#sec-array.prototype.sort"></emu-xref>.</p>
Expand Down Expand Up @@ -33944,7 +33945,6 @@ <h1>ValidateTypedArray ( _O_ )</h1>
1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot.
1. Let _buffer_ be _O_.[[ViewedArrayBuffer]].
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
1. Return _buffer_.
</emu-alg>
</emu-clause>
</emu-clause>
Expand Down Expand Up @@ -35985,7 +35985,8 @@ <h1>ValidateIntegerTypedArray ( _typedArray_ [ , _waitable_ ] )</h1>
<p>The abstract operation ValidateIntegerTypedArray takes argument _typedArray_ and optional argument _waitable_ (a Boolean). It performs the following steps when called:</p>
<emu-alg>
1. If _waitable_ is not present, set _waitable_ to *false*.
1. Let _buffer_ be ? ValidateTypedArray(_typedArray_).
1. Perform ? ValidateTypedArray(_typedArray_).
1. Let _buffer_ be _typedArray_.[[ViewedArrayBuffer]].
1. Let _typeName_ be _typedArray_.[[TypedArrayName]].
1. Let _type_ be the Element Type value in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _typeName_.
1. If _waitable_ is *true*, then
Expand Down

0 comments on commit b083b70

Please sign in to comment.