Bug 1353917 - 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 556450 ab7fe341a64b186385ade39b5853049d65516356
parent 555725 b043233ec04f06768d59dcdfb9e928142280f3cc
child 622896 a60bb41086040776a9c71ca2296c85e58a639fcd
push id52555
push usermhowell@mozilla.com
push dateWed, 05 Apr 2017 22:26:29 +0000
reviewersrstrong
bugs1353917
milestone55.0a1
Bug 1353917 - 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: