Replace use of getMostRecentBrowserWindow() in mailnews
Categories
(MailNews Core :: General, defect)
Tracking
(Not tracked)
People
(Reporter: jose, Unassigned)
References
Details
Attachments
(1 file)
|
2.00 KB,
patch
|
mkmelin
:
review-
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Steps to reproduce:
From bug 1710275 comment #11.
getMostRecentWindow("mail:3pane", ...) should be used like in about 50 other places throughout C-C. getMostRecentBrowserWindow() doesn't seem to be the right function, it has "browser" in its name and it calls getMostRecentWindow("navigator:browser", ...) first and then via a conditional compile for Thunderbird calls getMostRecentWindow("mail:3pane", ...) anyway. The conditional code was introduced in bug 1608894 for certificate handling, but it could be removed at some stage.
| Reporter | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
| Reporter | ||
Comment 3•5 years ago
|
||
It's not just the name, the function looks for another window first:
https://searchfox.org/mozilla-central/rev/048146721b3c1a568257afb4325c7a8d94334e2d/xpfe/appshell/nsWindowMediator.cpp#236
It's surprising that what was implemented as a hack for bug 1608894 should now become mainstream usage. For mainstream use, the M-C function would need to change not to try "navigator:browser" first. Until you have a clear concept of how you want to proceed, this should go ahead.
Updated•4 years ago
|
Description
•