From 476ffb70d543ed6534c570bac01c77138051080c Mon Sep 17 00:00:00 2001 From: SHIMODA Hiroshi Date: Tue, 13 Dec 2011 20:18:32 +0900 Subject: [PATCH] refactoring --- modules/browser.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index 2f8d4222..06ec2fa8 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -2300,16 +2300,14 @@ TreeStyleTabBrowser.prototype = { var tabs = this.getAllTabsArray(this.mTabBrowser); tabs = tabs.filter(function(aTab) { - if (aTab.__treestyletab__structureRestored) // onWindowStateRestored can be called twice - return false; - + var currentId = aTab.getAttribute(this.kID); if ( - !aTab.getAttribute(this.kID) || // tabs opened by externals applications - !aTab.linkedBrowser.__SS_restoreState + !currentId || // tabs opened by externals applications + !aTab.linkedBrowser.__SS_restoreState || + aTab.__treestyletab__structureRestored ) return false; - var currentId = aTab.getAttribute(this.kID); if (this.tabsHash[currentId] == aTab) delete this.tabsHash[currentId];