Backed out changeset 41ded240a012 (bug 1342012) for wrong bug number in commit message
authorJon Coppeard <jcoppeard@mozilla.com>
Mon, 22 Oct 2018 11:38:13 +0100
changeset 490635 84f29739c1da074c184d5e21e73b59d083a0e29d
parent 490634 41ded240a012ad72cb57fed5b84603d438bf173c
child 490636 a836d54d21da033ae12512de20e68b21454df06b
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
bugs1342012
milestone64.0a1
backs out41ded240a012ad72cb57fed5b84603d438bf173c
Backed out changeset 41ded240a012 (bug 1342012) for wrong bug number in commit message
js/src/builtin/Module.js
js/src/jit-test/tests/modules/dynamic-import-oom.js
--- a/js/src/builtin/Module.js
+++ b/js/src/builtin/Module.js
@@ -294,27 +294,26 @@ function ModuleInstantiate()
     let stack = [];
 
     // Steps 4-5
     try {
         InnerModuleInstantiation(module, stack, 0);
     } catch (error) {
         for (let i = 0; i < stack.length; i++) {
             let m = stack[i];
-            if (m.status === MODULE_STATUS_INSTANTIATING) {
-                HandleModuleInstantiationFailure(m);
-            }
+            assert(m.status === MODULE_STATUS_INSTANTIATING,
+                   "Expected instantiating status during failed instantiation");
+            HandleModuleInstantiationFailure(m);
         }
 
         // Handle OOM when appending to the stack or over-recursion errors.
-        if (stack.length === 0 && module.status === MODULE_STATUS_INSTANTIATING) {
+        if (stack.length === 0)
             HandleModuleInstantiationFailure(module);
-        }
 
-        assert(module.status !== MODULE_STATUS_INSTANTIATING,
+        assert(module.status === MODULE_STATUS_UNINSTANTIATED,
                "Expected uninstantiated status after failed instantiation");
 
         throw error;
     }
 
     // Step 6
     assert(module.status === MODULE_STATUS_INSTANTIATED ||
            module.status === MODULE_STATUS_EVALUATED ||
deleted file mode 100644
--- a/js/src/jit-test/tests/modules/dynamic-import-oom.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// |jit-test| skip-if: !('oomTest' in this)
-
-oomTest(() => import("module1.js"));
-oomTest(() => import("cyclicImport1.js"));