diff options
Diffstat (limited to 'js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js')
-rw-r--r-- | js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js new file mode 100644 index 0000000000..a8f2cad117 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js @@ -0,0 +1,15 @@ +// |jit-test| allow-oom; skip-if: (getBuildConfiguration("tsan")) + +let buffer = new ArrayBuffer(0); + +let result = null; +try { + result = buffer.transfer(2 ** 32); +} catch { + // Intentionally ignore allocation failure. +} + +// If the allocation succeeded, |result| has the correct size. +if (result) { + assertEq(result.byteLength, 2 ** 32); +} |