blob: 753b174debbf4079b8c34b6e984bcf478a151072 (
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
|
// |jit-test| --enable-top-level-await;
dbgGlobal = newGlobal({newCompartment: true});
dbg = new dbgGlobal.Debugger;
dbg.addDebuggee(this);
function f() {
dbg.getNewestFrame().older.eval("");
}
function execModule(source) {
m = parseModule(source);
m.declarationInstantiation();
return m.evaluation();
}
execModule("f();").then(() => {
gc();
execModule("throw 'foo'")
.then(r => {
// We should not reach here.
assertEq(false, true);
})
.catch(e => {
assertEq(e, 'foo');
});
})
drainJobQueue();
|