From 7d9307470b1ed85cd4532e6b5fcf5f81898de921 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Sat, 15 Dec 2007 00:25:17 +0000 Subject: [PATCH] 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 --- mozilla/browser/base/content/tabbrowser.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mozilla/browser/base/content/tabbrowser.xml b/mozilla/browser/base/content/tabbrowser.xml index b696262ce97..5e07ebe4868 100644 --- a/mozilla/browser/base/content/tabbrowser.xml +++ b/mozilla/browser/base/content/tabbrowser.xml @@ -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