Bug 1011978 - fix use of updater service in nsBrowserGlue to check for MOZ_UPDATER,r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 18 Aug 2015 12:33:24 +0100
changeset 290968 766ec6335893befe3435bc021569f0ad10c300f0
parent 290967 3658808a325abf5c0dc29ac9d4c20a6d25a57c8a
child 290969 fe896cc2c627b5dfd63dd8e06de243391b4cf6e7
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1011978
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1011978 - fix use of updater service in nsBrowserGlue to check for MOZ_UPDATER,r=jaws
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -167,16 +167,19 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/AddonWatcher.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
                                   "resource://gre/modules/LightweightThemeManager.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionManagement",
                                   "resource://gre/modules/ExtensionManagement.jsm");
 
+XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
+                                  "resource://gre/modules/AppConstants.jsm");
+
 const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser";
 const PREF_PLUGINS_UPDATEURL  = "plugins.update.url";
 
 // Seconds of idle before trying to create a bookmarks backup.
 const BOOKMARKS_BACKUP_IDLE_TIME_SEC = 8 * 60;
 // Minimum interval between backups.  We try to not create more than one backup
 // per interval.
 const BOOKMARKS_BACKUP_MIN_INTERVAL_DAYS = 1;
@@ -816,17 +819,18 @@ BrowserGlue.prototype = {
 
 #ifdef NIGHTLY_BUILD
     AddonWatcher.init(this._notifySlowAddon);
 #endif
   },
 
   _checkForOldBuildUpdates: function () {
     // check for update if our build is old
-    if (Services.prefs.getBoolPref("app.update.enabled") &&
+    if (AppConstants.MOZ_UPDATER &&
+        Services.prefs.getBoolPref("app.update.enabled") &&
         Services.prefs.getBoolPref("app.update.checkInstallTime")) {
 
       let buildID = Services.appinfo.appBuildID;
       let today = new Date().getTime();
       let buildDate = new Date(buildID.slice(0,4),     // year
                                buildID.slice(4,6) - 1, // months are zero-based.
                                buildID.slice(6,8),     // day
                                buildID.slice(8,10),    // hour