зеркало из https://github.com/mozilla/gecko-dev.git
Bug 939192 - Fix about flyout js error with updater. r=bbondy
This commit is contained in:
Родитель
36e3e7fb63
Коммит
5caab4d178
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче