From 2d54b402c058fb12a9bd571213d9b8edb76cc72f Mon Sep 17 00:00:00 2001 From: Piro / SHIMODA Hiroshi Date: Thu, 8 Dec 2011 05:17:06 +0900 Subject: [PATCH] call updateInsertionPositionInfo only for "fast restor"ed tabs --- modules/browser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index 3973e49f..96bab74f 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -2288,13 +2288,13 @@ TreeStyleTabBrowser.prototype = { restoreTreeStructure : function TSTBrowser_restoreTreeStructure() { var tabs = this.getAllTabsArray(this.mTabBrowser); - tabs.reverse().forEach(function(aTab) { + tabs.reverse().filter(function(aTab) { var id = this.getTabValue(aTab, this.kID); if ( !id || // tabs opened by externals applications aTab.hidden // tabs in background groups ) - return; + return false; var alreadyRestored = id == aTab.getAttribute(this.kID); @@ -2321,9 +2321,9 @@ TreeStyleTabBrowser.prototype = { if (!alreadyRestored) aTab.__treestyletab__structureRestored = true; - }, this); - tabs.forEach(this.updateInsertionPositionInfo, this); + return true + }, this).forEach(this.updateInsertionPositionInfo, this); }, /* DOM Event Handling */