Closed Bug 1772097 Opened 2 years ago Closed 2 years ago

Use plain object for lazy getter in services/

Categories

(Cloud Services :: General, task)

task

Tracking

(firefox103 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(7 files)

+++ This bug was initially created as a clone of Bug #1772007 +++

Many JSM files define lazy getters on the per-JSM global this object.
The global this object doesn't exist in ES module, and those lazy getters need to be moved to a plain object const lazy = {};, and each consumer needs to be rewritten to refer the lazy getter with lazy.foo.

This migration is done by automated script in bug 1608279.

Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/f1ce0ff966d2
Part 1: Use plain object for lazy getter in services/automation/. r=markh
https://hg.mozilla.org/integration/autoland/rev/fc2209504c63
Part 2: Use plain object for lazy getter in services/common/. r=markh
https://hg.mozilla.org/integration/autoland/rev/9078d3c250cb
Part 3: Use plain object for lazy getter in services/crypto/modules/. r=markh
https://hg.mozilla.org/integration/autoland/rev/b6ecac27ebce
Part 4: Use plain object for lazy getter in services/fxaccounts/. r=markh
https://hg.mozilla.org/integration/autoland/rev/3c525187fcf9
Part 5: Use plain object for lazy getter in services/settings/. r=markh
https://hg.mozilla.org/integration/autoland/rev/ec1e4198a03c
Part 6: Use plain object for lazy getter in services/sync/. r=markh
https://hg.mozilla.org/integration/autoland/rev/20b091190754
Part 7: Use plain object for lazy getter in services/fxaccounts/FxAccounts.jsm except for fxAccounts in toolkit/components/formautofill/. r=markh

This change is already causing a lot of pain on uplifts to ESR102 due to all the changes in context throughout the codebase. How practical would it be to make this (and related) changes to that branch as well given that ESR102 has over a year of support ahead of it still?

Flags: needinfo?(arai.unmht)

most parts can be done mostly automatically, by the rule in bug 1608279 attachment.
I'll look into making esr102 uplift patches this and next weeks.
where should I put those patches?

actually, there are several preparation patches, and it will be 200+ patches in total, including both preparation and rewrite.

Let's file a new bug to track everything that would have to go into ESR102 for it. Thanks!

Flags: needinfo?(arai.unmht)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: