Bug 1549391 - Do no show the notification for an expired build if the updater is not available. r=IanN a=IanN default
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sun, 12 May 2019 14:32:10 +0200
changeset 28310 341e6b4a9882faea9905dd4a85024f0c21589999
parent 28309 3636dfc6f54f123fa9437c38c94d1e0fcc5abd71
child 28311 cb995a74a5bc22968520a2e6f70e94ae84b1dff6
push id2133
push userfrgrahl@gmx.net
push dateSun, 12 May 2019 12:33:15 +0000
treeherdercomm-esr52@341e6b4a9882 [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/common/src/nsSuiteGlue.js
--- a/suite/common/src/nsSuiteGlue.js
+++ b/suite/common/src/nsSuiteGlue.js
@@ -33,16 +33,19 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/BookmarkHTMLUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils",
                                   "resource://gre/modules/BookmarkJSONUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
                                   "resource://gre/modules/Task.jsm");
 
+XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
+                                  "resource://gre/modules/AppConstants.jsm");
+
 XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => {
   var tmp = {};
   Components.utils.import("resource://devtools/shared/Loader.jsm", tmp);
   return tmp.require("devtools/server/main").DebuggerServer;
 });
 
 // We try to backup bookmarks at idle times, to avoid doing that at shutdown.
 // Number of idle seconds before trying to backup bookmarks.  15 minutes.
@@ -809,16 +812,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;