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
--- 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: