Skip to content

Commit

Permalink
Better handle SessionStore.jsm internals
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Aug 10, 2014
1 parent 7460ca5 commit 2a7876a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1251,13 +1251,16 @@ var privateTab = {
if(!tabState.isPrivate)
return;
var {SessionStoreInternal} = Components.utils.import("resource://app/modules/sessionstore/SessionStore.jsm", {});
var maxTabsUndo = SessionStoreInternal._max_tabs_undo;
var maxTabsUndo = "_max_tabs_undo" in SessionStoreInternal
? SessionStoreInternal._max_tabs_undo
: prefs.getPref("browser.sessionstore.max_tabs_undo", 0);
if(maxTabsUndo <= 0)
return;
if(SessionStoreInternal._shouldSaveTabState(tabState)) {
var tabTitle = tab.label;
var gBrowser = window.gBrowser;
tabTitle = SessionStoreInternal._replaceLoadingTitle(tabTitle, gBrowser, tab);
if("_replaceLoadingTitle" in SessionStoreInternal)
tabTitle = SessionStoreInternal._replaceLoadingTitle(tabTitle, gBrowser, tab);
var data = SessionStoreInternal._windows[window.__SSi];
var closedTabs = data._closedTabs;
closedTabs.unshift({
Expand Down

0 comments on commit 2a7876a

Please sign in to comment.