Bug 1549391 - Do no show the notification for an expired build if the updater is not available. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sun, 12 May 2019 14:24:38 +0200
changeset 32195 6dc568428c81f0eb85f345fedbfa5c473a60a601
parent 32194 c5995af2599ebb334d403fc84a2d4a46584832bd
child 32196 70ce813285f678f675a7ef2d83af7c4c82c47640
push id189
push userfrgrahl@gmx.net
push dateSun, 12 May 2019 12:25:14 +0000
treeherdercomm-esr60@6dc568428c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1549391, 1011978
Bug 1549391 - Do no show the notification for an expired build if the updater is not available. r=IanN a=IanN Port Bug 1011978 [fix use of updater service in nsBrowserGlue to check for MOZ_UPDATER].
suite/components/nsSuiteGlue.js
--- a/suite/components/nsSuiteGlue.js
+++ b/suite/components/nsSuiteGlue.js
@@ -23,16 +23,17 @@ XPCOMUtils.defineLazyModuleGetters(this,
   BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.jsm",
   RecentWindow: "resource:///modules/RecentWindow.jsm",
   Sanitizer: "resource:///modules/Sanitizer.jsm",
   ShellService: "resource:///modules/ShellService.jsm",
   DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
   PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
   Integration: "resource://gre/modules/Integration.jsm",
   PermissionUI: "resource:///modules/PermissionUI.jsm",
+  AppConstants: "resource://gre/modules/AppConstants.jsm",
 });
 
 XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => {
   var tmp = {};
   ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp);
   return tmp.require("devtools/server/main").DebuggerServer;
 });
 
@@ -861,16 +862,20 @@ SuiteGlue.prototype = {
     Services.prefs.setBoolPref("browser.rights." + currentVersion + ".shown", true);
   },
 
   /*
    * _shouldShowUpdateWarning - Determines if the user should be warned about
    * having updates off and an old build that likely should be updated.
    */
   _shouldShowUpdateWarning: function () {
+    // If the Updater is not available we don't show the warning.
+    if (!AppConstants.MOZ_UPDATER) {
+      return false;  
+    }
     // Look for an unconditional override pref. If set, do what it says.
     // (true --> never show, false --> always show)
     try {
       return !Services.prefs.getBoolPref("app.updatecheck.override");
     } catch (e) { }
     // If updates are enabled, we don't need to worry.
     if (Services.prefs.getBoolPref("app.update.enabled"))
       return false;