diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/modules/bug-1498980.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/modules/bug-1498980.js b/js/src/jit-test/tests/modules/bug-1498980.js new file mode 100644 index 0000000000..f05dca6af5 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1498980.js @@ -0,0 +1,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(); |