diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/sharedbuf/is-zeroed.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/sharedbuf/is-zeroed.js b/js/src/jit-test/tests/sharedbuf/is-zeroed.js new file mode 100644 index 0000000000..e92b7013c8 --- /dev/null +++ b/js/src/jit-test/tests/sharedbuf/is-zeroed.js @@ -0,0 +1,13 @@ +// |jit-test| skip-if: !this.SharedArrayBuffer + +// 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); +} + +f(); |