diff --git a/security/manager/pki/resources/content/pippki.js b/security/manager/pki/resources/content/pippki.js index cf967c1162b9..4d275e7f927b 100644 --- a/security/manager/pki/resources/content/pippki.js +++ b/security/manager/pki/resources/content/pippki.js @@ -31,7 +31,7 @@ async function viewCertHelper(parent, cert, openingOption = "tab") { } if (Services.prefs.getBoolPref("security.aboutcertificate.enabled")) { - let win = Services.wm.getMostRecentWindow("navigator:browser"); + let win = Services.wm.getMostRecentBrowserWindow(); let results = await asyncDetermineUsages(cert); let chain = getBestChain(results); if (!chain) { diff --git a/xpfe/appshell/nsIWindowMediator.idl b/xpfe/appshell/nsIWindowMediator.idl index cdf5a0dd6492..ef891c053717 100644 --- a/xpfe/appshell/nsIWindowMediator.idl +++ b/xpfe/appshell/nsIWindowMediator.idl @@ -67,7 +67,7 @@ interface nsIWindowMediator: nsISupports mozIDOMWindowProxy getMostRecentWindow(in wstring aWindowType); /** This is a shortcut for getMostRecentWindow('navigator:browser'), but - * it also tries 'navigator:geckoview' if that fails. + * if that fails it also tries 'navigator:geckoview' and 'mail:3pane'. * * @return the topmost browser window */ diff --git a/xpfe/appshell/nsWindowMediator.cpp b/xpfe/appshell/nsWindowMediator.cpp index 1e59688c471f..ff2af1506345 100644 --- a/xpfe/appshell/nsWindowMediator.cpp +++ b/xpfe/appshell/nsWindowMediator.cpp @@ -245,6 +245,13 @@ nsWindowMediator::GetMostRecentBrowserWindow(mozIDOMWindowProxy** outWindow) { } #endif +#ifdef MOZ_THUNDERBIRD + if (!*outWindow) { + rv = GetMostRecentWindow(u"mail:3pane", outWindow); + NS_ENSURE_SUCCESS(rv, rv); + } +#endif + return NS_OK; }