Closed Bug 1771476 Opened 3 months ago Closed 3 months ago

Do not export lazy getter "PREFS_GUID" from services/sync/modules/engines/prefs.js

Categories

(Firefox :: Firefox Accounts, task)

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/b462b11e71b500e084f51e61fbd9e19ea0122c78/services/sync/modules/engines/prefs.js#5,30-32

var EXPORTED_SYMBOLS = ["PrefsEngine", "PrefRec", "PREFS_GUID"];
...
XPCOMUtils.defineLazyGetter(this, "PREFS_GUID", () =>
  CommonUtils.encodeBase64URL(Services.appinfo.ID)
);

This exports lazy getter "PREFS_GUID" defined on the per-JSM global this.
This is not possible with ESM, and this needs to be rewritten not to rely on global this

This is exported only for testing, so exporting testing-only function that returns PREFS_GUID should work

PREFS_GUID is a lazy getter, and it cannot be exported once ESM-ified.

Depends on D147597

Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/6e974f500a0b
Do not export lazy getter "PREFS_GUID" from services/sync/modules/engines/prefs.js. r=markh
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.