diff options
Diffstat (limited to 'js/src/jit-test/tests/modules/bug-1498980.js')
-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..753b174deb --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1498980.js @@ -0,0 +1,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(); |