Debian Codegraph @

js/src/jit-test/tests/typedarray/arraybuffer-transfer-coerce-large-bytelength.js

raw
1 // |jit-test| allow-oom; skip-if: (getBuildConfiguration("tsan"))
2
3 let buffer = new ArrayBuffer(0);
4
5 let result = null;
6 try {
7 result = buffer.transfer(2 ** 32);
8 } catch {
9 // Intentionally ignore allocation failure.
10 }
11
12 // If the allocation succeeded, |result| has the correct size.
13 if (result) {
14 assertEq(result.byteLength, 2 ** 32);
15 }