diff options
Diffstat (limited to 'mail/thunderbird/files/patch-bug1664607')
-rw-r--r-- | mail/thunderbird/files/patch-bug1664607 | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/mail/thunderbird/files/patch-bug1664607 b/mail/thunderbird/files/patch-bug1664607 new file mode 100644 index 000000000000..28053bd8ccb9 --- /dev/null +++ b/mail/thunderbird/files/patch-bug1664607 @@ -0,0 +1,49 @@ +# HG changeset patch +# User Rob Lemley <rob@thunderbird.net> +# Date 1600079976 -10800 +# Node ID 6379c3b860f7a1acc01dc549b6ce3cedf250831b +# Parent d1ffffd30cb1c6b4c636f89006c89cfa73282216 +Bug 1664607 - Don't try to load what's new page when built with updater disabled. r=mkmelin DONTBUILD + +When Thunderbird is built with --disable-updater, as it done by most Linux +distributions, accessing the nsIUpdateManager service will throw an error +resulting in a broken UI. Check AppConstants.MOZ_UPDATER when using +nsIUpdateManger to prevent errors. + +Differential Revision: https://phabricator.services.mozilla.com/D90023 + +diff --git a/mail/base/content/specialTabs.js b/mail/base/content/specialTabs.js +--- comm/mail/base/content/specialTabs.js ++++ comm/mail/base/content/specialTabs.js +@@ -1048,18 +1048,20 @@ var specialTabs = { + Services.prefs.setCharPref("mailnews.start_page_override.mstone", mstone); + } + +- let update = Cc["@mozilla.org/updates/update-manager;1"].getService( +- Ci.nsIUpdateManager +- ).activeUpdate; ++ if (AppConstants.MOZ_UPDATER) { ++ let update = Cc["@mozilla.org/updates/update-manager;1"].getService( ++ Ci.nsIUpdateManager ++ ).activeUpdate; + +- if (update && Services.vc.compare(update.appVersion, old_mstone) > 0) { +- let overridePage = Services.urlFormatter.formatURLPref( +- "mailnews.start_page.override_url" +- ); +- overridePage = this.getPostUpdateOverridePage(update, overridePage); +- overridePage = overridePage.replace("%OLD_VERSION%", old_mstone); +- if (overridePage) { +- openLinkExternally(overridePage); ++ if (update && Services.vc.compare(update.appVersion, old_mstone) > 0) { ++ let overridePage = Services.urlFormatter.formatURLPref( ++ "mailnews.start_page.override_url" ++ ); ++ overridePage = this.getPostUpdateOverridePage(update, overridePage); ++ overridePage = overridePage.replace("%OLD_VERSION%", old_mstone); ++ if (overridePage) { ++ openLinkExternally(overridePage); ++ } + } + } + }, |