Closed Bug 1772283 Opened 2 months ago Closed 2 months ago

Use plain object for lazy getter in Thunderbird - Stop calling XPCOMUtils.defineLazyGetter on the global `this` in JSMs

Categories

(Thunderbird :: Upstream Synchronization, task, P1)

Tracking

(thunderbird_esr102 wontfix)

RESOLVED FIXED
103 Branch
Tracking Status
thunderbird_esr102 --- wontfix

People

(Reporter: mkmelin, Assigned: mkmelin)

References

Details

Attachments

(5 files)

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

It's a pretty common pattern, but we'll need to stop doing it for ES Modules since there's no global this.

See bug 1608279 comment 3 and bug 1608279 comment 5.

Status: NEW → ASSIGNED

For chat/ there was the additional compliacation of the exported _ function.
=> Error: Lazy getter shouldn't be exported : _

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/255068d5dc33
Use plain object for lazy getter in mail/ r=freaktechnik
https://hg.mozilla.org/comm-central/rev/f21f745370a9
Use plain object for lazy getter in calendar/ r=freaktechnik
https://hg.mozilla.org/comm-central/rev/d3d0f918969d
Use plain object for lazy getter in chat/ r=freaktechnik

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1c8338564f82
follow-up - fix mozilla/valid-lazy linting errors. r=#thunderbird-reviewers,darktrojan

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/8d89958be85d
Fix leftover lazy.log in Policies.jsm. r=mkmelin

You need to log in before you can comment on or make changes to this bug.