Closed
Bug 1776175
Opened 3 years ago
Closed 8 months ago
Stop exposing module global variables via Cu.import
Categories
(Core :: XPConnect, task)
Core
XPConnect
Tracking
()
RESOLVED
DUPLICATE
of bug 1881888
People
(Reporter: arai, Unassigned)
References
(Blocks 1 open bug)
Details
Cu.import returns a proxy for the module's global object, that exposed global non-lexical and lexical variables.
for ESM, this causes de-optimization on the global variable not to use local slot.
// De-optimize ES module's top-level `var`s, in order to define all of them
// on the ModuleEnvironmentObject, instead of local slot.
//
// This is used for providing all global variables in Cu.import return value
// (see bug 1766761 for more details), and this is temporary solution until
// ESM-ification finishes.
//
// WARNING: This option will eventually be removed.
bool deoptimizeModuleGlobalVars = false;
Once all dependencies to Cu.import return value goes away, we should remove this behavior.
In order to achieve this, yet another out-of-tree migration is necessary to migrate Cu.import with shim to ChromeUtils.importESModule
Reporter | ||
Comment 1•8 months ago
|
||
We can just remove Cu.import
in bug 1881888.
The deoptimizeModuleGlobalVars
option will be removed in bug 1938859.
You need to log in
before you can comment on or make changes to this bug.
Description
•