Bug 1316564 - Skip the downloading page in the update wizard if the update is already staged. r?rstrong draft
authorMatt Howell <mhowell@mozilla.com>
Wed, 05 Apr 2017 14:23:27 -0700
changeset 556436 ebf33cd5c718cc67cef31ccbdfe10243b2b87a8b
parent 555725 b043233ec04f06768d59dcdfb9e928142280f3cc
child 622890 676b8a26e030ced99d6cc7f8c18a8a288199e66b
push id52549
push usermhowell@mozilla.com
push dateWed, 05 Apr 2017 21:33:47 +0000
reviewersrstrong
bugs1316564
milestone55.0a1
Bug 1316564 - Skip the downloading page in the update wizard if the update is already staged. r?rstrong 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: