summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/regress/oom-wasm-streaming.js
blob: 5d7e7199129e36496ba077e149afa6c3c97102bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |jit-test| skip-if: !('oomAfterAllocations' in this)

ignoreUnhandledRejections();

try {
    WebAssembly.compileStreaming();
} catch (err) {
    assertEq(String(err).indexOf("not supported with --no-threads") !== -1, true);
    quit();
}
oomAfterAllocations(1, 2);
var x = wasmTextToBinary('(module (func (export "run") (result i32) i32.const 42))');
WebAssembly.compileStreaming(x);
drainJobQueue();