bug1900526.js (375B)
1 // |jit-test| heavy; allow-oom; skip-if: !canRunHugeMemoryTests() 2 3 const maxPages = wasmMaxMemoryPages("i64"); 4 const m = new WebAssembly.Memory({initial: 0n, address: "i64"}); 5 try { 6 m.grow(BigInt(maxPages)); 7 assertEq(m.buffer.byteLength, maxPages * PageSizeInBytes); 8 } catch (e) { 9 assertEq(e.message.includes("failed to grow"), true, `got error: ${e}`); // OOM 10 }