Bug 1507086 - Port bug 1506371 to TB: Updating via Help > About broken on Nightly. r=jorgk DONTBUILD
authorRichard Marti <richard.marti@gmail.com>
Wed, 14 Nov 2018 10:56:03 +0100
changeset 33706 8882026b926ab30a10cfdd416b51cbc1184e9799
parent 33705 4c662872fa5b25b5ede75c83d6fc18899ca2c1cd
child 33707 d7bd220d248670a6f85c74656aaa2b7ff228d835
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1507086, 1506371
Bug 1507086 - Port bug 1506371 to TB: Updating via Help > About broken on Nightly. r=jorgk DONTBUILD
mail/base/content/aboutDialog-appUpdater.js
--- a/mail/base/content/aboutDialog-appUpdater.js
+++ b/mail/base/content/aboutDialog-appUpdater.js
@@ -20,17 +20,17 @@ function onUnload(aEvent) {
   gAppUpdater.removeDownloadListener();
   gAppUpdater = null;
 }
 
 
 function appUpdater()
 {
   this.updateDeck = document.getElementById("updateDeck");
-  this.promiseAutoUpdateSetting = null;
+  this.promiseAutoUpdateSetting;
 
   // Hide the update deck when there is already an update window open to avoid
   // syncing issues between them.
   if (Services.wm.getMostRecentWindow("Update:Wizard")) {
     this.updateDeck.hidden = true;
     return;
   }
 
@@ -246,20 +246,20 @@ appUpdater.prototype =
         return;
       }
 
       if (!gAppUpdater.aus.canApplyUpdates) {
         gAppUpdater.selectPanel("manualUpdate");
         return;
       }
 
-      if (this.promiseAutoUpdateSetting == null) {
-        this.promiseAutoUpdateSetting = this.aus.getAutoUpdateIsEnabled();
+      if (!gAppUpdater.promiseAutoUpdateSetting) {
+        gAppUpdater.promiseAutoUpdateSetting = gAppUpdater.aus.getAutoUpdateIsEnabled();
       }
-      this.promiseAutoUpdateSetting.then(updateAuto => {
+      gAppUpdater.promiseAutoUpdateSetting.then(updateAuto => {
         if (updateAuto) { // automatically download and install
           gAppUpdater.startDownload();
         } else { // ask
           gAppUpdater.selectPanel("downloadAndInstall");
         }
       });
     },