mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1225565 - Fix module import cycle detection r=shu
This commit is contained in:
parent
7d59b56c34
commit
ab938abdf9
@ -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
|
||||
|
1
js/src/jit-test/modules/recursiveStarExport.js
Normal file
1
js/src/jit-test/modules/recursiveStarExport.js
Normal file
@ -0,0 +1 @@
|
||||
export * from 'recursiveStarExport.js';
|
2
js/src/jit-test/tests/modules/recursive-star-export.js
Normal file
2
js/src/jit-test/tests/modules/recursive-star-export.js
Normal file
@ -0,0 +1,2 @@
|
||||
// |jit-test| module;
|
||||
import * as ns from "recursiveStarExport.js";
|
Loading…
Reference in New Issue
Block a user