summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/sharedbuf/sab-gating.js
blob: 4ecd13ddd7bcaeaad9e8b021a22b2d7c621e554a (plain)
1
2
3
4
5
6
7
8
// Check gating of shared memory features in plain js (bug 1231338).

// Need this testing function to continue.
if (!this.sharedMemoryEnabled)
    quit(0);

assertEq(sharedMemoryEnabled(), !!this.SharedArrayBuffer);
assertEq(sharedMemoryEnabled(), !!this.Atomics);