Closed Bug 1797760 Opened 3 years ago Closed 2 years ago

Deal with "browser-delayed-startup-finished" being hard coded in toolkit

Categories

(Thunderbird :: Mail Window Front End, task)

Tracking

(thunderbird_esr102 wontfix)

RESOLVED FIXED
108 Branch
Tracking Status
thunderbird_esr102 --- wontfix

People

(Reporter: john, Assigned: john)

References

Details

Attachments

(2 files)

We renamed the observer "browser-delayed-startup-finished" to "mail-delayed-startup-finished" and use that.

However, m-c has hard coded the use of "browser-delayed-startup-finished" in toolkit here [1]:
https://searchfox.org/mozilla-central/source/toolkit/components/extensions/ExtensionParent.jsm#2288

and in some other places [2]:
https://searchfox.org/mozilla-central/search?q=browser-delayed-startup-finished&path=toolkit&case=false&regexp=false

None of these usages do anything, but I need at least the one shown in [1] to get MV3 background restart working. I do not know if we actually need any of the other non-working listeners shown in[2] as well.

Note: We currently also have some dead listeners in our own code as well:
https://searchfox.org/comm-central/search?q=browser-delayed-startup-finished&path=mail%2F&case=false&regexp=false

How to proceed?

Flags: needinfo?(mkmelin+mozilla)
Blocks: 1797764

I guess it might be best to just switch us over to using browser-delayed-startup-finished. (And remove mail-delayed-startup-finished handling from toolkit)

Flags: needinfo?(mkmelin+mozilla)
Assignee: nobody → john
Status: NEW → ASSIGNED
Blocks: 1797914

Shouldn't the m-c patch land first?

Target Milestone: --- → 108 Branch

If m-c lands first, we break, because the waitForInitialApplicationWindowLoaded promise in m-c/toolkit will no longer fulfil, because there is nobody who sends the "browser-delayed-startup-finished" notification (we currently only issue the mail-... variant).

This patch is an intermediate step, where we issue both variants of the notification and move our code to the browser variant. So we keep issuing
the "mail-delayed-startup-finished" notification just for m-c/toolkit code.

After this has landed, we can safely land the m-c/toolkit patch and then stop sending the mail-... variant in our code.

Keywords: leave-open

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/4e22be8afc28
Switching to use browser-delayed-startup-finished instead of mail-delayed-startup-finished due to extensive use in toolkit. r=mkmelin

This is causing: TEST-UNEXPECTED-FAIL | toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_severities.js | test_1 - [test_1 : 270] A promise chain failed to handle a rejection: JavaScript component does not have a method named: "registerNotification"'JavaScript component does not have a method named: "registerNotification"' when calling method: [nsIWindowWatcher::registerNotification] - stack: addOpenListener@chrome://extensions/content/paren

Will back it out for daily.

Backout by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c703a9bb23eb
Backed out changeset 4e22be8afc28 for test failures.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/61ac59a56436
Switching to use browser-delayed-startup-finished instead of mail-delayed-startup-finished due to extensive use in toolkit. r=mkmelin

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/193ce2dbbec8
No longer notify the mail-delayed-startup-finished observer. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Regressions: 1803728
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: