Skip to content

Commit

Permalink
Don't touch already closed tab in toggleContextTabPrivate()
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Dec 31, 2016
1 parent 1595c92 commit 5048bdd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2540,9 +2540,7 @@ var privateTab = {
gBrowser.moveTabTo(dupTab, pos);
if(tab.selected)
gBrowser.selectedTab = dupTab;
window.setTimeout(function(tab) {
gBrowser.removeTab(tab);
}, 0, tab);
gBrowser.removeTab(tab);
tab = dupTab;
// Duplicated tab will be reloaded anyway
autoReload = stopLoading = false;
Expand Down Expand Up @@ -2578,12 +2576,14 @@ var privateTab = {
browser.stop();
}
}
if(tab.selected) { // Only for hotkey
window.setTimeout(function() {
if(!tab.selected) // Only for hotkey
return;
this.updateTabContext(window);
this.updateTabTooltip(window);
if("TabScope" in window && "_updateTitle" in window.TabScope && window.TabScope._tab)
window.TabScope._updateTitle();
}
}.bind(this), 0);
},

cmdAttr: "privateTab-command",
Expand Down

0 comments on commit 5048bdd

Please sign in to comment.