blob: fb640b6c5d49315dc26cf4a6cbcfacfed35af3c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright (C) 2017 Mozilla Corporation. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-atomics.wake
description: >
Test range checking of Atomics.wake on arrays that allow atomic operations
includes: [testAtomics.js]
---*/
var sab = new SharedArrayBuffer(4);
var view = new Int32Array(sab);
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
let Idx = IdxGen(view);
assert.throws(RangeError, () => Atomics.wake(view, Idx, 0)); // Even with waking zero
});
|