summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug-1799678.js
blob: a1423355adb5dfa2706e08f9f7b04c1e2c44d0b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
gczeal(0);
setMarkStackLimit(1);
loadFile(`
  function wasmEvalText(str, imports) {
    let binary = wasmTextToBinary(str);
    m = new WebAssembly.Module(binary);
    return new WebAssembly.Instance(m, imports);
  }
  let WasmFuncrefValues = [
    wasmEvalText(\`(module (func (export "")))\`).exports[''],
  ];
  g1 = newGlobal({newCompartment: true});
  gczeal(10,10);
`);
for (let i = 0; i < 1000; ++i)
  loadFile("}");
function loadFile(lfVarx) {
  try {
    evaluate(lfVarx);
  } catch (lfVare) {}
}