Bug 635975 - Older jetpack addons cause tabs to become totally disorganized in Panorama [r=ian a=dveditz]
authorTim Taubert <tim.taubert@gmx.de>
Fri, 25 Mar 2011 23:40:00 +0100
changeset 63372 062e9361345ee66491c5dc29c23c8b5bec655f2b
parent 63371 7124cc6d660d52174328694b8f74447a9d71d938
child 63374 1a5d1d6db84a7d8b8ec39cad7a5a7e7429d72aad
push id32
push usereakhgari@mozilla.com
push dateFri, 01 Apr 2011 21:29:34 +0000
reviewersian, dveditz
bugs635975
milestone2.0pre
Bug 635975 - Older jetpack addons cause tabs to become totally disorganized in Panorama [r=ian a=dveditz]
browser/base/content/tabview/tabitems.js
--- a/browser/base/content/tabview/tabitems.js
+++ b/browser/base/content/tabview/tabitems.js
@@ -850,17 +850,19 @@ let TabItems = {
 
       self.update(tab);
     }
     // When a tab is closed, unlink.
     this._eventListeners["close"] = function(tab) {
       if (tab.ownerDocument.defaultView != gWindow || tab.pinned)
         return;
 
-      self.unlink(tab);
+      // XXX bug #635975 - don't unlink the tab if the dom window is closing.
+      if (!UI.isDOMWindowClosing)
+        self.unlink(tab);
     }
     for (let name in this._eventListeners) {
       AllTabs.register(name, this._eventListeners[name]);
     }
 
     // For each tab, create the link.
     AllTabs.tabs.forEach(function(tab) {
       if (tab.ownerDocument.defaultView != gWindow || tab.pinned)