Bug 1225565 - Fix module import cycle detection r=shu

This commit is contained in:
Jon Coppeard 2015-11-24 09:57:33 +00:00
parent 7d59b56c34
commit ab938abdf9
3 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,7 @@ function ModuleGetExportedNames(exportStarSet = [])
let module = this;
// Step 2
if (module in exportStarSet)
if (callFunction(ArrayIncludes, exportStarSet, module))
return [];
// Step 3
@ -47,7 +47,7 @@ function ModuleGetExportedNames(exportStarSet = [])
exportStarSet);
for (let j = 0; j < starNames.length; j++) {
let n = starNames[j];
if (n !== "default" && !(n in exportedNames))
if (n !== "default" && !callFunction(ArrayIncludes, exportedNames, n))
_DefineDataProperty(exportedNames, namesCount++, n);
}
}
@ -104,7 +104,7 @@ function ModuleResolveExport(exportName, resolveSet = [], exportStarSet = [])
}
// Step 7
if (module in exportStarSet)
if (callFunction(ArrayIncludes, exportStarSet, module))
return null;
// Step 8

View File

@ -0,0 +1 @@
export * from 'recursiveStarExport.js';

View File

@ -0,0 +1,2 @@
// |jit-test| module;
import * as ns from "recursiveStarExport.js";