summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/sharedbuf/is-zeroed.js
blob: a6ac32b0fdbdb654cf57357c7af95ed9f0df76f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Test that the SharedArrayBuffer memory is properly zeroed.

function f() {
    var x = new SharedArrayBuffer(4096);
    var y = new Int32Array(x);
    assertEq(y[0], 0);
    assertEq(y[1], 0);
    assertEq(y[1023], 0);
}

if (this.SharedArrayBuffer)
    f();