diff options
Diffstat (limited to 'js/src/jit-test/tests/modules/bug-1420420-4.js')
-rw-r--r-- | js/src/jit-test/tests/modules/bug-1420420-4.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/modules/bug-1420420-4.js b/js/src/jit-test/tests/modules/bug-1420420-4.js new file mode 100644 index 0000000000..6181183ce3 --- /dev/null +++ b/js/src/jit-test/tests/modules/bug-1420420-4.js @@ -0,0 +1,18 @@ +load(libdir + "asserts.js"); + +registerModule("a", parseModule(`throw undefined`)); + +let b = registerModule("b", parseModule(`import "a";`)); +let c = registerModule("c", parseModule(`import "a";`)); + +moduleLink(b); +moduleLink(c); + +(async () => { + let count = 0; + try { await moduleEvaluate(b) } catch (e) { count++; } + try { await moduleEvaluate(c) } catch (e) { count++; } + assertEq(count, 2); +})(); + +drainJobQueue(); |