Backed out 2 changesets (bug 1476921) for build bustage. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Tue, 28 Aug 2018 22:33:24 +0300
changeset 488777 211b070bac735ff9301f80af489a045a7f644b60
parent 488776 28b6adbb3b4c9d076a1b93590cf12ffe22795ecc
child 488778 3205543f957cd2a6905486d73aa897535fdd9825
child 488803 d94aeed0de33ee666bafd81c6640e7f905d06024
push id9734
push usershindli@mozilla.com
push dateThu, 30 Aug 2018 12:18:07 +0000
treeherdermozilla-beta@71c71ab3afae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1476921
milestone63.0a1
backs out25af0b19ec39666d33efe54a7feca0e7cb35fb6c
873cd2e119b3296e3407969f1f7459726f5d2a17
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 2 changesets (bug 1476921) for build bustage. CLOSED TREE Backed out changeset 25af0b19ec39 (bug 1476921) Backed out changeset 873cd2e119b3 (bug 1476921)
js/src/builtin/Module.js
js/src/jit-test/tests/modules/bug-1476921.js
--- a/js/src/builtin/Module.js
+++ b/js/src/builtin/Module.js
@@ -183,37 +183,42 @@ function IsResolvedBinding(resolution)
 }
 
 // 15.2.1.18 GetModuleNamespace(module)
 function GetModuleNamespace(module)
 {
     // Step 1
     assert(IsObject(module) && IsModule(module), "GetModuleNamespace called with non-module");
 
-    // Step 2
+    // Until issue https://github.com/tc39/ecma262/issues/1155 is resolved,
+    // violate the spec here and throw if called on an errored module.
+    if (module.status === MODULE_STATUS_EVALUATED_ERROR)
+        throw GetModuleEvaluationError(module);
+
+    // Steps 2-3
     assert(module.status !== MODULE_STATUS_UNINSTANTIATED,
            "Bad module state in GetModuleNamespace");
 
-    // Step 3
+    // Step 4
     let namespace = module.namespace;
 
-    // Step 4
+    // Step 3
     if (typeof namespace === "undefined") {
         let exportedNames = callFunction(module.getExportedNames, module);
         let unambiguousNames = [];
         for (let i = 0; i < exportedNames.length; i++) {
             let name = exportedNames[i];
             let resolution = callFunction(module.resolveExport, module, name);
             if (IsResolvedBinding(resolution))
                 _DefineDataProperty(unambiguousNames, unambiguousNames.length, name);
         }
         namespace = ModuleNamespaceCreate(module, unambiguousNames);
     }
 
-    // Step 5
+    // Step 4
     return namespace;
 }
 
 // 9.4.6.13 ModuleNamespaceCreate(module, exports)
 function ModuleNamespaceCreate(module, exports)
 {
     callFunction(ArraySort, exports);
 
deleted file mode 100644
--- a/js/src/jit-test/tests/modules/bug-1476921.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use strict";
-
-load(libdir + "asserts.js");
-load(libdir + "dummyModuleResolveHook.js");
-
-class UniqueError extends Error {}
-
-let a = moduleRepo['a'] = parseModule(`
-    throw new UniqueError();
-`);
-
-let b = moduleRepo['b'] = parseModule(`
-    import * as ns0 from "a";
-`);
-
-instantiateModule(a);
-assertThrowsInstanceOf(() => evaluateModule(a), UniqueError);
-instantiateModule(b);
-assertThrowsInstanceOf(() => evaluateModule(b), UniqueError);