# HG changeset patch # User Rob Lemley # Date 1600079976 -10800 # Node ID f085dbd311bc4b013605202de04de9a81bb55ed1 # Parent 391f1b69f6d617dd566297dd92c5f1188c6eca20 Bug 1664607 - Don't try to load what's new page when built with updater disabled. r=mkmelin a=wsmwk 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 Added "comm" to the file paths (by Jonathan Brielmaier ) diff --git a/comm/mail/base/content/specialTabs.js b/comm/mail/base/content/specialTabs.js --- a/comm/mail/base/content/specialTabs.js +++ b/comm/mail/base/content/specialTabs.js @@ -1043,28 +1043,30 @@ var specialTabs = { "" ); let mstone = Services.appinfo.version; if (mstone != old_mstone) { 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); + } } } }, /** * Gets the override page for the first run after the application has been * updated. * @param {nsIUpdate} update - The nsIUpdate for the update that has been applied.