1 // |reftest| skip-if(!this.hasOwnProperty('Atomics')||!this.hasOwnProperty('SharedArrayBuffer')||(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('arm64-simulator'))) -- Atomics,SharedArrayBuffer is not enabled unconditionally, ARM64 Simulator cannot emulate atomics
2 // Copyright (C) 2017 Mozilla Corporation. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
8 Test range checking of Atomics.load on arrays that allow atomic operations
9 includes: [testAtomics.js, testTypedArray.js]
10 features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray]
13 var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2);
14 var views = nonClampedIntArrayConstructors.slice();
16 testWithTypedArrayConstructors(function(TA) {
17 let view = new TA(buffer);
18 testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
19 assert.throws(RangeError, function() {
20 Atomics.load(view, IdxGen(view));