1 // |reftest| skip-if(!this.hasOwnProperty('Atomics')) -- Atomics is not enabled unconditionally
2 // Copyright (C) 2020 Rick Waldron. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-atomics.notify
7 Evaluates count before returning 0, when TA.buffer is not a SharedArrayBuffer
9 Atomics.notify( typedArray, index, count )
11 Let buffer be ? ValidateIntegerTypedArray(typedArray, true).
14 Let intCount be ? ToInteger(count).
15 Let c be max(intCount, 0).
17 If IsSharedArrayBuffer(buffer) is false, return 0.
20 features: [ArrayBuffer, Atomics, TypedArray]
23 const i32a = new Int32Array(
24 new ArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
29 throw new Test262Error();
33 assert.throws(Test262Error, function() {
34 Atomics.notify(i32a, 0, poisoned);
35 }, '`Atomics.notify(i32a, 0, poisoned)` throws Test262Error');