Bug 723084 - Remove observers when tabs are destroyed [r=bnicholson]

This commit is contained in:
Matt Brubeck 2012-02-01 16:20:13 -08:00
Родитель 6d6813dac8
Коммит fc3694f29f
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -1508,6 +1508,8 @@ Tab.prototype = {
this.browser.removeEventListener("pagehide", this, true); this.browser.removeEventListener("pagehide", this, true);
this.browser.removeEventListener("pageshow", this, true); this.browser.removeEventListener("pageshow", this, true);
Services.obs.removeObserver(this, "document-shown");
// Make sure the previously selected panel remains selected. The selected panel of a deck is // Make sure the previously selected panel remains selected. The selected panel of a deck is
// not stable when panels are removed. // not stable when panels are removed.
let selectedPanel = BrowserApp.deck.selectedPanel; let selectedPanel = BrowserApp.deck.selectedPanel;