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