Bug 893781 - Defect - Restart after update button no longer works. r=timA

This commit is contained in:
Brian R. Bondy 2013-07-24 16:09:36 -04:00
parent 528ae6bcd0
commit 819ca930f5
2 changed files with 6 additions and 4 deletions

View File

@ -403,7 +403,7 @@
<deck id="updateDeck" orient="vertical">
<hbox id="updateButtonBox" align="center">
<button id="updateButton" align="start"
oncommand="gAppUpdater.buttonOnCommand();"/>
oncommand="FlyoutPanelsUI.AboutFlyout.appUpdater.buttonOnCommand();"/>
<spacer flex="1"/>
</hbox>
<hbox id="checkingForUpdates" align="center">

View File

@ -52,7 +52,8 @@ let AboutFlyout = {
case 'MozFlyoutPanelShowing':
#ifdef MOZ_UPDATER
onUnload();
gAppUpdater = new appUpdater();
this.appUpdater = new appUpdater();
gAppUpdater = this.appUpdater;
#endif
break;
}
@ -74,6 +75,7 @@ function onUnload(aEvent) {
// Safe to call even when there isn't a download in progress.
gAppUpdater.removeDownloadListener();
gAppUpdater = null;
AboutFlyout.appUpdater = null;
}
function appUpdater()
@ -547,7 +549,7 @@ appUpdater.prototype =
this.selectPanel("applying");
let update = this.um.activeUpdate;
let self = this;
Services.obs.addObserver(function (aSubject, aTopic, aData) {
Services.obs.addObserver(function updateStaged(aSubject, aTopic, aData) {
// Update the UI when the background updater is finished
let status = aData;
if (status == "applied" || status == "applied-service" ||
@ -569,7 +571,7 @@ appUpdater.prototype =
self.setupDownloadingUI();
return;
}
Services.obs.removeObserver(arguments.callee, "update-staged");
Services.obs.removeObserver(updateStaged, "update-staged");
}, "update-staged", false);
} else {
this.selectPanel("updateButtonBox");