Bug 939192 - Fix about flyout js error with updater. r=bbondy

This commit is contained in:
Jim Mathies 2013-11-22 07:24:21 -06:00
Родитель 36e3e7fb63
Коммит 5caab4d178
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -66,6 +66,10 @@
this.classList.remove("flyoutpanel-slide-in");
this.setAttribute("isSlidingOut", true);
this.removeAttribute("isSlidIn");
let event = document.createEvent("Events");
event.initEvent("MozFlyoutPanelHiding", true, false);
this.dispatchEvent(event);
]]>
</body>
</method>

Просмотреть файл

@ -39,6 +39,7 @@ let AboutFlyoutPanel = {
}
window.addEventListener('MozFlyoutPanelShowing', this, false);
window.addEventListener('MozFlyoutPanelHiding', this, false);
#if MOZ_UPDATE_CHANNEL != release
let defaults = Services.prefs.getDefaultBranch("");
@ -59,9 +60,13 @@ let AboutFlyoutPanel = {
switch (aEvent.type) {
case 'MozFlyoutPanelShowing':
#ifdef MOZ_UPDATER
onUnload();
this.appUpdater = new appUpdater();
gAppUpdater = this.appUpdater;
#endif
break;
case 'MozFlyoutPanelHiding':
#ifdef MOZ_UPDATER
onUnload();
#endif
break;
}
@ -83,7 +88,7 @@ function onUnload(aEvent) {
// Safe to call even when there isn't a download in progress.
gAppUpdater.removeDownloadListener();
gAppUpdater = null;
AboutFlyout.appUpdater = null;
AboutFlyoutPanel.appUpdater = null;
}
function appUpdater()