From db4d2bac2c5d0f6e2f3da2333ad2e7d53add1a8b Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Tue, 30 Sep 2014 17:06:49 +0900 Subject: [PATCH] Update cached "toBeRestored" state for TSTWindow#restoringTree and others --- modules/browser.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/browser.js b/modules/browser.js index 55549b5f..fba999cd 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -6626,8 +6626,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { var onlyVisible = level <= this.kRESTORE_TREE_ONLY_VISIBLE; tabs = tabs.filter(function(aTab) { + var toBeRestored = utils.isTabNotRestoredYet(aTab); + // This cache can be set to false by initTab(), but now we not the correct status. + // Because this cached status is used by other methods, we must update it now. + aTab.linkedBrowser.__treestyletab__toBeRestored = toBeRestored; return ( - utils.isTabNotRestoredYet(aTab) && + toBeRestored && (!onlyVisible || !aTab.hidden) ); });