Bug 882142 - Initiate Metro app update requests via retarting the app like Desktop Firefox does. r=jimm
authorBrian R. Bondy <netzen@gmail.com>
Tue, 10 Sep 2013 10:24:56 -0400
changeset 159259 42411ca90ef300c5e80fd43896d78de974e2f2f2
parent 159258 f8f04499e62a0acc9801655d35c3ca844e1322dc
child 159260 282aa46c82d145a91c9cbc227f59950cc28ebfc2
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs882142
milestone26.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 882142 - Initiate Metro app update requests via retarting the app like Desktop Firefox does. r=jimm
browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
--- a/browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
+++ b/browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
@@ -260,39 +260,27 @@ appUpdater.prototype =
       let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].
                        createInstance(Components.interfaces.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
 
       // Something aborted the quit process.
       if (cancelQuit.data)
         return;
 
-      // It's not possible for the Metro browser to restart itself.
-      // The Windows background process ensures only one instance exists.
-      // So start the update while the browser is open and close the browser
-      // right after.
-      try {
-        Components.classes["@mozilla.org/updates/update-processor;1"].
-          createInstance(Components.interfaces.nsIUpdateProcessor).
-          processUpdate(null);
-      } catch (e) {
-        // If there was an error just close down and the next startup
-        // will do this.
-      }
-
       let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
                        getService(Components.interfaces.nsIAppStartup);
 
       // If already in safe mode restart in safe mode (bug 327119)
       if (Services.appinfo.inSafeMode) {
         appStartup.restartInSafeMode(Components.interfaces.nsIAppStartup.eAttemptQuit);
         return;
       }
 
-      appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit);
+      appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit |
+                      Components.interfaces.nsIAppStartup.eRestart);
       return;
     }
 
     const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul";
     // Firefox no longer displays a license for updates and the licenseURL check
     // is just in case a distibution does.
     if (this.update && (this.update.billboardURL || this.update.licenseURL ||
         this.addons.length != 0)) {