You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. If _typedArray_.[[ContentType]] is ~BigInt~, let _v_ be ? ToBigInt(_value_).
38110
38110
1. Otherwise, let _v_ be ? ToInteger(_value_).
38111
38111
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
38112
+
1. NOTE: The above check is not redundant with the check in ValidateIntegerTypedArray because the call to ToBigInt or ToInteger on the preceding lines can have arbitrary side effects, which could cause the buffer to become detached.
38112
38113
1. Let _elementSize_ be the Element Size value specified in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _arrayTypeName_.
38113
38114
1. Let _elementType_ be the Element Type value in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _arrayTypeName_.
1. Let _buffer_ be ? ValidateIntegerTypedArray(_typedArray_).
38125
38126
1. Let _i_ be ? ValidateAtomicAccess(_typedArray_, _index_).
38126
38127
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
38128
+
1. NOTE: The above check is not redundant with the check in ValidateIntegerTypedArray because the call to ValidateAtomicAccess on the preceding line can have arbitrary side effects, which could cause the buffer to become detached.
38127
38129
1. Let _arrayTypeName_ be _typedArray_.[[TypedArrayName]].
38128
38130
1. Let _elementSize_ be the Element Size value specified in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _arrayTypeName_.
38129
38131
1. Let _elementType_ be the Element Type value in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _arrayTypeName_.
1. Let _expected_ be ? ToInteger(_expectedValue_).
38210
38212
1. Let _replacement_ be ? ToInteger(_replacementValue_).
38211
38213
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
38214
+
1. NOTE: The above check is not redundant with the check in ValidateIntegerTypedArray because the call to ToBigInt or ToInteger on the preceding lines can have arbitrary side effects, which could cause the buffer to become detached.
38212
38215
1. Let _elementType_ be the Element Type value in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _arrayTypeName_.
38213
38216
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
38214
38217
1. Let _expectedBytes_ be NumericToRawBytes(_elementType_, _expected_, _isLittleEndian_).
1. If _arrayTypeName_ is *"BigUint64Array"* or *"BigInt64Array"*, let _v_ be ? ToBigInt(_value_).
38279
38282
1. Otherwise, let _v_ be ? ToInteger(_value_).
38280
38283
1. If IsDetachedBuffer(_buffer_) is *true*, throw a *TypeError* exception.
38284
+
1. NOTE: The above check is not redundant with the check in ValidateIntegerTypedArray because the call to ToBigInt or ToInteger on the preceding lines can have arbitrary side effects, which could cause the buffer to become detached.
38281
38285
1. Let _elementSize_ be the Element Size value specified in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _arrayTypeName_.
38282
38286
1. Let _elementType_ be the Element Type value in <emu-xref href="#table-the-typedarray-constructors"></emu-xref> for _arrayTypeName_.
0 commit comments