Reuse existing `ChromeUtils.defineESModuleGetters` call in `./mach esmify`
Categories
(Core :: XPConnect, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
When applying ./mach esmify --imports
on single file multiple times for different set of modules, multiple ChromeUtils.defineESModuleGetters
can be generated from XPCOMUtils.defineLazyModuleGetters
.
Also there can be multiple ChromeUtils.defineModuleGetter
calls.
it would be nice to find existing ChromeUtils.defineESModuleGetters
call on the same object in the same level, and extending it instead of adding new ChromeUtils.defineESModuleGetters
for each time.
Assignee | ||
Comment 1•3 years ago
|
||
example case that can use existing call: https://hg.mozilla.org/try/diff/7b2560b94ab3aa8a7088e6397d36974a6446a920/browser/actors/ContentSearchParent.jsm
Assignee | ||
Comment 2•3 years ago
|
||
When converting lazy getter calls, if the previous/next statement is
ChromeUtils.defineESModuleGetters
, add properties into it, instead of
converting the lazy getter call into ChromeUtils.defineESModuleGetters
or creating new ChromeUtils.defineESModuleGetters
call.
Updated•3 years ago
|
![]() |
||
Comment 4•3 years ago
|
||
bugherder |
Description
•