Bug 355284 - If you quickly close a tab whilst it's loading, in History > Recently Closed Tabs it can be titled 'Loading...'. r=dietrich

This commit is contained in:
Simon Bünzli 2008-09-08 13:54:47 +02:00
parent 8cdc35e80a
commit e908c93110

View File

@ -596,9 +596,17 @@ SessionStoreService.prototype = {
// store closed-tab data for undo
if (tabState.entries.length > 0) {
let tabTitle = aTab.label;
let tabbrowser = aWindow.gBrowser;
// replace "Loading..." with the document title (with minimal side-effects)
if (tabTitle == tabbrowser.mStringBundle.getString("tabs.loading")) {
tabbrowser.setTabTitle(aTab);
[tabTitle, aTab.label] = [aTab.label, tabTitle];
}
this._windows[aWindow.__SSi]._closedTabs.unshift({
state: tabState,
title: aTab.getAttribute("label"),
title: tabTitle,
image: aTab.getAttribute("image"),
pos: aTab._tPos
});