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) ); });