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

This commit is contained in:
reed@reedloden.com 2007-12-14 16:25:17 -08:00
Родитель 24dc76e2ad
Коммит 0e58830236
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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