Skip to content
Permalink
Browse files

Fix broken tree after session restoration

  • Loading branch information...
Piro / SHIMODA Hiroshi
Piro / SHIMODA Hiroshi committed Aug 4, 2012
1 parent cf64de0 commit b33d012b44325e7abf5b2dffb616fede9aecc1d0
Showing with 8 additions and 1 deletion.
  1. +8 −1 modules/browser.js
@@ -878,6 +878,12 @@ TreeStyleTabBrowser.prototype = {
if (!(id in this.tabsHash))
this.tabsHash[id] = aTab;
}
else {
// if the tab is restored from session, it can be not-cached.
let id = aTab.getAttribute(this.kID);
if (!(id in this.tabsHash))
this.tabsHash[id] = aTab;
}

aTab.__treestyletab__linkedTabBrowser = this.mTabBrowser;

@@ -3534,8 +3540,9 @@ TreeStyleTabBrowser.prototype = {

var closeSetId = !structureRestored && this._getCloseSetId(aTab, mayBeDuplicated);

// remove temporary cache
var currentId = aTab.getAttribute(this.kID);
if (id != currentId && currentId)
if (id != currentId && currentId && currentId in this.tabsHash)
delete this.tabsHash[currentId];

this.setTabValue(aTab, this.kID, id);

0 comments on commit b33d012

Please sign in to comment.
You can’t perform that action at this time.