summaryrefslogtreecommitdiffstats
path: root/js/src/tests/shell/futex.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-23 15:20:34 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-23 15:20:34 +0000
commita42bed2e9a78715889240ff900e2391bef923285 (patch)
tree202c502b7e964384fb7f0639b756353374b0c045 /js/src/tests/shell/futex.js
parent9a2224a97c7d258fc1f0e5fad30706987880ce22 (diff)
parent276f6583e00edf2a217a3092471ca2aa3aab5a09 (diff)
downloadUXP-a42bed2e9a78715889240ff900e2391bef923285.tar
UXP-a42bed2e9a78715889240ff900e2391bef923285.tar.gz
UXP-a42bed2e9a78715889240ff900e2391bef923285.tar.lz
UXP-a42bed2e9a78715889240ff900e2391bef923285.tar.xz
UXP-a42bed2e9a78715889240ff900e2391bef923285.zip
Merge branch 'master' into remove-unboxed
# Conflicts: # js/src/jit/BaselineIC.cpp # js/src/jsarray.cpp
Diffstat (limited to 'js/src/tests/shell/futex.js')
-rw-r--r--js/src/tests/shell/futex.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/src/tests/shell/futex.js b/js/src/tests/shell/futex.js
index b0951f12e..8ba61d71c 100644
--- a/js/src/tests/shell/futex.js
+++ b/js/src/tests/shell/futex.js
@@ -67,6 +67,8 @@ if (helperThreadCount() === 0) {
quit();
}
+var mem = new Int32Array(new SharedArrayBuffer(1024));
+
////////////////////////////////////////////////////////////
// wait() returns "not-equal" if the value is not the expected one.
@@ -102,7 +104,7 @@ dprint("Sleeping for 2 seconds");
sleep(2);
dprint("Waking the main thread now");
setSharedArrayBuffer(null);
-assertEq(Atomics.wake(mem, 0, 1), 1); // Can fail spuriously but very unlikely
+assertEq(Atomics.notify(mem, 0, 1), 1); // Can fail spuriously but very unlikely
`);
var then = Date.now();
@@ -113,14 +115,14 @@ assertEq(getSharedArrayBuffer(), null); // The worker's clearing of the mbx is v
////////////////////////////////////////////////////////////
-// Test the default argument to atomics.wake()
+// Test the default argument to atomics.notify()
setSharedArrayBuffer(mem.buffer);
evalInWorker(`
var mem = new Int32Array(getSharedArrayBuffer());
sleep(2); // Probably long enough to avoid a spurious error next
-assertEq(Atomics.wake(mem, 0), 1); // Last argument to wake should default to +Infinity
+assertEq(Atomics.notify(mem, 0), 1); // Last argument to wake should default to +Infinity
`);
var then = Date.now();