blob: 577060543f0a139985c1242587fab1c7383d3398 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// |jit-test| --enable-top-level-await;--more-compartments;
let lfCode = `
var g = newGlobal();
g.debuggeeGlobal = this;
g.eval("(" + function () {
dbg = new Debugger(debuggeeGlobal);
dbg.onExceptionUnwind = function (frame, exc) {};
} + ")();");
`;
loadFile(lfCode);
// use "await" so the module is marked as TLA
loadFile(lfCode + " await ''");
async function loadFile(lfVarx) {
try {
try { evaluate(lfVarx); } catch(exc) {}
let lfMod = parseModule(lfVarx);
lfMod.declarationInstantiation();
await lfMod.evaluation();
} catch (lfVare) {}
}
|