Add ImportESModuleOptionsDictionary parameter to ChromeUtils.defineESModuleGetters
Categories
(Core :: XPConnect, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(3 files)
ImportESModuleOptionsDictionary option is used for controlling where the module is loaded into.
Currently it has loadInDevToolsLoader
field to control whether to load into DevTools' global or not.
Bug 1803810 is going to add more options, including "load into current global" behavior, that is module-variant of Services.scriptloader.loadSubScript
.
and it's better having the option also in ChromeUtils.defineESModuleGetters
, so that people don't have to use ChromeUtils.defineLazyGetter
+ChromeUtils.importESModule
Assignee | ||
Comment 1•2 years ago
|
||
Pass the global/loadInDevToolsLoader options to the lazy getter, with encoding
the option into single integer and store into the getter function's extended
slot.
Depends on D199462
Assignee | ||
Comment 2•2 years ago
|
||
Expose defineESModuleGetters to worker as well, while only supporting
{ global: "current" } option.
Depends on D199463
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D199464
Comment 5•2 years ago
|
||
Backed out for workers/clients related dt failures.
- Backout link
- Push with failures
- Failure Log
- Failure line: EST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-log-points-workers.js | Test timed out -
Assignee | ||
Comment 6•2 years ago
|
||
Apparently this depends on bug 1875639 part 2 changes, due to pre-existing use of ChromeUtils.defineESModuleGetters
in devtools worker, without actually loading modules.
the validation for global
parameter happens at call, and it fails.
I'll fix it.
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6d00ab2fcde7
https://hg.mozilla.org/mozilla-central/rev/dbb3a63499dd
https://hg.mozilla.org/mozilla-central/rev/f75a84b9f7d5
Description
•