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
parent aaf81fe456
commit 57e6536fa4

View File

@ -1508,6 +1508,8 @@ Tab.prototype = {
this.browser.removeEventListener("pagehide", 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
// not stable when panels are removed.
let selectedPanel = BrowserApp.deck.selectedPanel;