blob: b9f4d8dd0c42c17e7268d773e344ab359f8c46cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// |jit-test| skip-if: helperThreadCount() === 0
gczeal(0);
let lfPreamble = `
var lfOffThreadGlobal = newGlobal({newCompartment: true});
for (lfLocal in this)
try {} catch(lfVare5) {}
`;
evaluate(lfPreamble);
evaluate(`
var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
for (lfLocal in this)
if (!(lfLocal in lfOffThreadGlobal))
try {
lfOffThreadGlobal[lfLocal] = this[lfLocal];
} catch(lfVare5) {}
var g = newGlobal({newCompartment: true});
var gw = dbg.addDebuggee(g);
`);
lfOffThreadGlobal.offThreadCompileToStencil(`
setMarkStackLimit(1);
grayRoot()[0] = "foo";
`);
var stencil = lfOffThreadGlobal.finishOffThreadStencil();
lfOffThreadGlobal.evalStencil(stencil);
eval(`
var lfOffThreadGlobal = newGlobal({newCompartment: true});
try { evaluate(\`
gczeal(18, 1);
grayRoot()[0] = "foo";
let inst = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(
\\\`(module
(memory (export "memory") 1 1)
)\\\`
)));
\`); } catch(exc) {}
`);
|