You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Let _moduleContext_ be a new ECMAScript code execution context.
1. Set the Function of _moduleContext_ to *null*.
1. Set the Realm of _moduleContext_ to _module_.[[Realm]].
1. Set the ScriptOrModule of _moduleContext_ to _module_.
1. Set the VariableEnvironment of _moduleContext_ to _module_.[[Environment]].
1. Set the LexicalEnvironment of _moduleContext_ to _module_.[[Environment]].
Originally, those steps were only in ExecuteModule, and then PR #1670 moved them all to InitializeEnvironment (putting the resulting _moduleContext_ into _module_.[[Context]], which was then used in ExecuteModule).
But then PR #2408 (Top Level Await) added those steps back to ExecuteModule (and dropped the reference to _module_.[[Context]]).
I'm pretty sure this was unintentional (just an ill-resolved rebase conflict), because:
In ExecuteModule, use the execution context that
InitializeEnvironment created and put in _module_.[[Context]].
See issue tc39#2660 for backstory.
Resolvestc39#2660.
I just noticed that 16.2.1.6.4 InitializeEnvironment and 16.2.1.6.5 ExecuteModule (for a Source Text Module Record) both have:
Originally, those steps were only in ExecuteModule, and then PR #1670 moved them all to InitializeEnvironment (putting the resulting
_moduleContext_
into_module_.[[Context]]
, which was then used in ExecuteModule).But then PR #2408 (Top Level Await) added those steps back to ExecuteModule (and dropped the reference to
_module_.[[Context]]
).I'm pretty sure this was unintentional (just an ill-resolved rebase conflict), because:
_module_.[[Context]]
, andCan someone confirm that ExecuteModule should just use
_module_.[[Context]]
?The text was updated successfully, but these errors were encountered: