diff --git a/test/built-ins/Atomics/notify/null-bufferdata-throws.js b/test/built-ins/Atomics/notify/null-bufferdata-throws.js index 4ec0989b91..761c359826 100644 --- a/test/built-ins/Atomics/notify/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/notify/null-bufferdata-throws.js @@ -3,15 +3,21 @@ /*--- esid: sec-atomics.notify description: > - A null value for bufferData throws a TypeError + A null value for bufferData (detached) throws a TypeError info: | Atomics.notify( typedArray, index, count ) - 1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true). + Let buffer be ? ValidateIntegerTypedArray(typedArray, true). + ... + + Let buffer be ? ValidateTypedArray(typedArray). ... - 9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception. - ... - 3.If bufferData is null, return false. + + If IsDetachedBuffer(buffer) is true, throw a TypeError exception. + ... + + If arrayBuffer.[[ArrayBufferData]] is null, return true. + includes: [detachArrayBuffer.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ @@ -29,7 +35,7 @@ const poisoned = { try { $DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null } catch (error) { - $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error}`); + $ERROR(`An unexpected error occurred when detaching ArrayBuffer: ${error.message}`); } assert.throws(TypeError, function() { diff --git a/test/built-ins/Atomics/wait/null-bufferdata-throws.js b/test/built-ins/Atomics/wait/null-bufferdata-throws.js index 5801216474..fa83cedf6d 100644 --- a/test/built-ins/Atomics/wait/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/wait/null-bufferdata-throws.js @@ -3,15 +3,21 @@ /*--- esid: sec-atomics.wait description: > - A null value for bufferData throws a TypeError + A null value for bufferData (detached) throws a TypeError info: | Atomics.wait( typedArray, index, value, timeout ) - 1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true). + Let buffer be ? ValidateIntegerTypedArray(typedArray, true). + ... + + Let buffer be ? ValidateTypedArray(typedArray). ... - 9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception. - ... - 3.If bufferData is null, return false. + + If IsDetachedBuffer(buffer) is true, throw a TypeError exception. + ... + + If arrayBuffer.[[ArrayBufferData]] is null, return true. + includes: [detachArrayBuffer.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/