summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/bug-1284486.js
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-08 12:58:30 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-30 09:33:06 +0000
commit498b1ab0c8db07784badbd2148f372027ef8cc27 (patch)
tree4b25652523fc84ca588671412b556195cef33d80 /js/src/jit-test/tests/modules/bug-1284486.js
parent2f145b6eda95c08a76711f0393e4d9ebe13a5f92 (diff)
downloadUXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar
UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar.gz
UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar.lz
UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.tar.xz
UXP-498b1ab0c8db07784badbd2148f372027ef8cc27.zip
Issue #618 - Align error handling for module scripts with the spec (again)
This updates module implementation to match spec regarding handling of instantiation errors, after it was changed yet again, this time to not remember instantiation errors, but instead immediately rethrow applicable ones. Ref: BZ 1420420
Diffstat (limited to 'js/src/jit-test/tests/modules/bug-1284486.js')
-rw-r--r--js/src/jit-test/tests/modules/bug-1284486.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/js/src/jit-test/tests/modules/bug-1284486.js b/js/src/jit-test/tests/modules/bug-1284486.js
index 08286393a..6fbd67d9d 100644
--- a/js/src/jit-test/tests/modules/bug-1284486.js
+++ b/js/src/jit-test/tests/modules/bug-1284486.js
@@ -1,9 +1,8 @@
-// This tests that attempting to perform ModuleDeclarationInstantation a second
-// time after a failure re-throws the same error.
+// This tests that module instantiation can succeed when executed a second
+// time after a failure.
//
// The first attempt fails becuase module 'a' is not available. The second
-// attempt fails because of the previous failure (it would otherwise succeed as
-// 'a' is now available).
+// attempt succeeds as 'a' is now available.
load(libdir + "dummyModuleResolveHook.js");
@@ -25,12 +24,9 @@ let a = moduleRepo['a'] = parseModule("export var a = 1; export var b = 2;");
let d = moduleRepo['d'] = parseModule("import { a } from 'c'; a;");
threw = false;
-let e2;
try {
d.declarationInstantiation();
} catch (exc) {
threw = true;
- e2 = exc;
}
-assertEq(threw, true);
-assertEq(e1, e2);
+assertEq(threw, false);