summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/bug-1498980.js
blob: f05dca6af568e36297c8c1400d38c7fdb1cb772c (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|
dbgGlobal = newGlobal({newCompartment: true});
dbg = new dbgGlobal.Debugger;
dbg.addDebuggee(this);

function f() {
    dbg.getNewestFrame().older.eval("");
}

function execModule(source) {
    m = parseModule(source);
    moduleLink(m);
    return moduleEvaluate(m);
}

execModule("f();").then(() => {
  gc();

  execModule("throw 'foo'")
    .then(r => {
      // We should not reach here.
      assertEq(false, true);
    })
    .catch(e => {
      assertEq(e, 'foo');
    });
})

drainJobQueue();