Index: test/mjsunit/harmony/futex.js |
diff --git a/test/mjsunit/harmony/futex.js b/test/mjsunit/harmony/futex.js |
index f90b773aa390aa4031b090fddf6bcc0d9050f609..6790988678eb27c200185da4a7cb45e51ef140ab 100644 |
--- a/test/mjsunit/harmony/futex.js |
+++ b/test/mjsunit/harmony/futex.js |
@@ -95,6 +95,15 @@ |
assertEquals("timed-out", Atomics.wait(i32a, 0, 0, -Infinity)); |
})(); |
+(function TestWaitNotAllowed() { |
+ %SetAllowAtomicsWait(false); |
+ var i32a = new Int32Array(new SharedArrayBuffer(16)); |
+ assertThrows(function() { |
+ Atomics.wait(i32a, 0, 0, -1); |
+ }); |
+ %SetAllowAtomicsWait(true); |
+})(); |
+ |
//// WORKER ONLY TESTS |
if (this.Worker) { |