1 // |reftest| skip-if(!this.hasOwnProperty('Atomics')) -- Atomics is not enabled unconditionally
2 // Copyright (C) 2018 Amal Hussein. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-atomics.notify
7 A null value for bufferData throws a TypeError
9 Atomics.notify( typedArray, index, count )
11 1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
13 9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception.
15 3.If bufferData is null, return false.
16 includes: [detachArrayBuffer.js]
17 features: [ArrayBuffer, Atomics, BigInt, TypedArray]
20 const i64a = new BigInt64Array(
21 new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
25 throw new Test262Error('should not evaluate this code');
30 $DETACHBUFFER(i64a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null
32 throw new Test262Error(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`);
35 assert.throws(TypeError, function() {
36 Atomics.notify(i64a, poisoned, poisoned);