Bug 402348 - "popup statusbar notification switches to incorrect tab when tab closed" [p=wgianopoulos@yahoo.com (Bill Gianopoulos) r=gavin a=blocking-firefox3+]

git-svn-id: svn://10.0.0.236/trunk@241303 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com
2007-12-15 00:25:17 +00:00
parent e0b098c9a9
commit 7d9307470b

View File

@@ -708,7 +708,8 @@
}
var updatePageReport = false;
if ((this.mCurrentBrowser.pageReport && !newBrowser.pageReport) ||
if (!this.mCurrentBrowser ||
(this.mCurrentBrowser.pageReport && !newBrowser.pageReport) ||
(!this.mCurrentBrowser.pageReport && newBrowser.pageReport))
updatePageReport = true;
@@ -1432,6 +1433,9 @@
// reset by updateCurrentBrowser.
oldBrowser.destroy();
if (oldBrowser == this.mCurrentBrowser)
this.mCurrentBrowser = null;
// Remove the tab
this.mTabContainer.removeChild(oldTab);
// invalidate cache, because mTabContainer is about to change