mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1233179 - Allow bytecode emitter to access module environment before module declarations are instantiated r=shu
This commit is contained in:
parent
0d3f2c7933
commit
ed6335fe8c
@ -1592,7 +1592,7 @@ BytecodeEmitter::tryConvertFreeName(ParseNode* pn)
|
||||
}
|
||||
|
||||
// Convert module import accesses to use JSOP_GETIMPORT.
|
||||
RootedModuleEnvironmentObject env(cx, ssi.module().environment());
|
||||
RootedModuleEnvironmentObject env(cx, &ssi.module().initialEnvironment());
|
||||
RootedPropertyName propName(cx, name);
|
||||
MOZ_ASSERT(env);
|
||||
if (env->hasImportBinding(propName)) {
|
||||
|
6
js/src/jit-test/tests/modules/bug-1233179.js
Normal file
6
js/src/jit-test/tests/modules/bug-1233179.js
Normal file
@ -0,0 +1,6 @@
|
||||
let c = parseModule(`
|
||||
function a(x) { return x; }
|
||||
function b(x) { return i<40; }
|
||||
function d(x) { return x + 3; }
|
||||
`);
|
||||
getLcovInfo();
|
Loading…
Reference in New Issue
Block a user