@@ -358,6 +358,7 @@ contributors: Mark S. Miller, Richard Gibson
358
358
1. Set _captured_ to _captured_ + 1.
359
359
1. Set _k_ to _k_ + 1.
360
360
1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_captured_) »<ins>, ~write~</ins>).
361
+ 1. <ins>Assert: IsImmutableBuffer(_A_.[[ViewedArrayBuffer]]) is *false*.</ins>
361
362
1. Let _n_ be 0.
362
363
1. For each element _e_ of _kept_, do
363
364
1. Perform ! Set(_A_, ! ToString(𝔽(_n_)), _e_, *true*).
@@ -377,6 +378,7 @@ contributors: Mark S. Miller, Richard Gibson
377
378
1. Let _len_ be TypedArrayLength(_taRecord_).
378
379
1. If IsCallable(_callback_) is *false*, throw a *TypeError* exception.
379
380
1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_len_) »<ins>, ~write~</ins>).
381
+ 1. <ins>Assert: IsImmutableBuffer(_A_.[[ViewedArrayBuffer]]) is *false*.</ins>
380
382
1. Let _k_ be 0.
381
383
1. Repeat, while _k_ < _len_,
382
384
1. Let _Pk_ be ! ToString(𝔽(_k_)).
@@ -452,6 +454,7 @@ contributors: Mark S. Miller, Richard Gibson
452
454
1. Else, let _endIndex_ be min(_relativeEnd_, _srcArrayLength_).
453
455
1. Let _countBytes_ be max(_endIndex_ - _startIndex_, 0).
454
456
1. Let _A_ be ? TypedArraySpeciesCreate(_O_, « 𝔽(_countBytes_) »<ins>, ~write~</ins>).
457
+ 1. <ins>Assert: IsImmutableBuffer(_A_.[[ViewedArrayBuffer]]) is *false*.</ins>
455
458
1. If _countBytes_ > 0, then
456
459
1. Set _taRecord_ to MakeTypedArrayWithBufferWitnessRecord(_O_, ~seq-cst~).
457
460
1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception.
0 commit comments