Bug 1353917 - Skip the downloading page in the update wizard if the update is already staged. r=rstrong a=gchang
authorMatt Howell <mhowell@mozilla.com>
Wed, 05 Apr 2017 14:23:27 -0700
changeset 375826 49b1ef6307a987a7cb622d74d5633871fe5dcafd
parent 375825 1d2549a6a16d6e603fcb6bd60204e2a8f3de061e
child 375827 ecbabf4c7f8d4eac7d7f1e24bcd37387569c5573
push id11037
push usercbook@mozilla.com
push dateMon, 10 Apr 2017 12:29:04 +0000
treeherdermozilla-aurora@0d8df2fe95cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrstrong, gchang
bugs1353917
milestone54.0a2
Bug 1353917 - Skip the downloading page in the update wizard if the update is already staged. r=rstrong a=gchang The update wizard's fallback mode (where it appears on startup to download and apply a complete update if applying a partial update has failed) begins to download and stage the update without waiting for the user to confirm. This means it can get ahead of itself and actually finish downloading and staging before the user can click OK to bring up the progress page. The progress page does not expect this and errors out in a way that breaks the otherwise valid update. This change therefore skips over that page if the update is finished staging when it would normally be shown. MozReview-Commit-ID: E6P2UKO4C9h
toolkit/mozapps/update/content/updates.js
--- a/toolkit/mozapps/update/content/updates.js
+++ b/toolkit/mozapps/update/content/updates.js
@@ -1199,16 +1199,18 @@ var gErrorPatchingPage = {
    * Initialize
    */
   onPageShow() {
     gUpdates.setButtons(null, null, "okButton", true);
   },
 
   onWizardNext() {
     switch (gUpdates.update.selectedPatch.state) {
+      case STATE_APPLIED:
+      case STATE_APPLIED_SERVICE:
       case STATE_PENDING:
       case STATE_PENDING_SERVICE:
         gUpdates.wiz.goTo("finished");
         break;
       case STATE_DOWNLOADING:
         gUpdates.wiz.goTo("downloading");
         break;
       case STATE_DOWNLOAD_FAILED: