Ignore already cleared redirection table (#605)

This commit is contained in:
YUKI "Piro" Hiroshi 2014-04-16 18:45:53 +09:00
parent 97a06e85db
commit bf576cfb75

View File

@ -4138,20 +4138,16 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
aTab._clearRedirectbTabRelationsTimer = this.window.setTimeout(function(aSelf) {
aSelf.clearRedirectbTabRelations(aTab);
delete aTab._clearRedirectbTabRelationsTimer;
}, 1500, this);
}, 1200, this);
},
clearRedirectbTabRelations : function TSTBrowser_clearRedirectbTabRelations(aTab)
{
if (!aTab || !aTab.parentNode)
return;
var redirectingIds = Object.keys(this._redirectionTable).map(function(aId) {
return this._redirectionTable[aId];
}, this);
var existingIds = this.getAllTabs(this.mTabBrowser).map(function(aTab) {
var validIds = this.getAllTabs(this.mTabBrowser).map(function(aTab) {
return this.getTabValue(aTab, this.kID);
}, this);
var validIds = redirectingIds.concat(existingIds);
validIds = validIds.filter(function(aId) {
return !!aId;
});