mirror of https://github.com/tc39/test262.git
Atomics: fix test info contents to match definition as it appears in ES2020. Fixes gh-2721
This commit is contained in:
parent
e8cdf923ef
commit
1c22e0b2f2
|
@ -3,15 +3,21 @@
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.notify
|
esid: sec-atomics.notify
|
||||||
description: >
|
description: >
|
||||||
A null value for bufferData throws a TypeError
|
A null value for bufferData (detached) throws a TypeError
|
||||||
info: |
|
info: |
|
||||||
Atomics.notify( typedArray, index, count )
|
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.
|
|
||||||
...
|
If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
|
||||||
3.If bufferData is null, return false.
|
...
|
||||||
|
|
||||||
|
If arrayBuffer.[[ArrayBufferData]] is null, return true.
|
||||||
|
|
||||||
includes: [detachArrayBuffer.js]
|
includes: [detachArrayBuffer.js]
|
||||||
features: [ArrayBuffer, Atomics, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
@ -29,7 +35,7 @@ const poisoned = {
|
||||||
try {
|
try {
|
||||||
$DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null
|
$DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null
|
||||||
} catch (error) {
|
} 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() {
|
assert.throws(TypeError, function() {
|
||||||
|
|
|
@ -3,15 +3,21 @@
|
||||||
/*---
|
/*---
|
||||||
esid: sec-atomics.wait
|
esid: sec-atomics.wait
|
||||||
description: >
|
description: >
|
||||||
A null value for bufferData throws a TypeError
|
A null value for bufferData (detached) throws a TypeError
|
||||||
info: |
|
info: |
|
||||||
Atomics.wait( typedArray, index, value, timeout )
|
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.
|
|
||||||
...
|
If IsDetachedBuffer(buffer) is true, throw a TypeError exception.
|
||||||
3.If bufferData is null, return false.
|
...
|
||||||
|
|
||||||
|
If arrayBuffer.[[ArrayBufferData]] is null, return true.
|
||||||
|
|
||||||
includes: [detachArrayBuffer.js]
|
includes: [detachArrayBuffer.js]
|
||||||
features: [ArrayBuffer, Atomics, TypedArray]
|
features: [ArrayBuffer, Atomics, TypedArray]
|
||||||
---*/
|
---*/
|
||||||
|
|
Loading…
Reference in New Issue