Closed Bug 1779927 Opened 3 years ago Closed 3 years ago

Reuse existing `ChromeUtils.defineESModuleGetters` call in `./mach esmify`

Categories

(Core :: XPConnect, task)

task

Tracking

()

RESOLVED FIXED
104 Branch
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.

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.

Attachment #9285762 - Attachment description: WIP: Bug 1779927 - Reuse existing ChromeUtils.defineESModuleGetters when converting lazy getters. r?Standard8! → Bug 1779927 - Reuse existing ChromeUtils.defineESModuleGetters when converting lazy getters. r?Standard8!
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/5447d4bcf563 Reuse existing ChromeUtils.defineESModuleGetters when converting lazy getters. r=Standard8
See Also: → 1779988
Regressions: 1780050
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Regressions: 1780166
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: