Bug 664549 - Delete references to the tab when unlinking a TabItem. r=gavin
authorDão Gottwald <dao@mozilla.com>
Thu, 16 Jun 2011 06:41:14 +0200
changeset 71147 ba3cd12b7334abab44f6333f1450fc8e74904e3a
parent 71146 02a14a8abac321915ae6e142bdb33111028117d7
child 71174 a09dfe6c7c19e3cc3abd73b629f6e02f32d9f07a
push id20497
push userdgottwald@mozilla.com
push dateThu, 16 Jun 2011 04:48:35 +0000
treeherdermozilla-central@ba3cd12b7334 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs664549
milestone7.0a1
first release with
nightly win64
ba3cd12b7334 / 7.0a1 / 20110616030207 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
Bug 664549 - Delete references to the tab when unlinking a TabItem. r=gavin
browser/base/content/tabview/tabitems.js
--- a/browser/base/content/tabview/tabitems.js
+++ b/browser/base/content/tabview/tabitems.js
@@ -1077,16 +1077,19 @@ let TabItems = {
         UI.setActive(null, { onlyRemoveActiveTab: true });
 
       this.unregister(tab._tabViewTabItem);
       tab._tabViewTabItem._sendToSubscribers("close");
       tab._tabViewTabItem.$container.remove();
       tab._tabViewTabItem.removeTrenches();
       Items.unsquish(null, tab._tabViewTabItem);
 
+      tab._tabViewTabItem.tab = null;
+      tab._tabViewTabItem.tabCanvas.tab = null;
+      tab._tabViewTabItem.tabCanvas = null;
       tab._tabViewTabItem = null;
       Storage.saveTab(tab, null);
 
       this._tabsWaitingForUpdate.remove(tab);
     } catch(e) {
       Utils.log(e);
     }
   },