diff options
author | JustOff <Off.Just.Off@gmail.com> | 2018-03-12 21:41:29 +0200 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2018-03-12 21:41:29 +0200 |
commit | a89ae67838277643eacac8e5e17b833835578637 (patch) | |
tree | 73c57947b8100dc12d78ce45ca489654c8c61355 /browser | |
parent | 5bc089af23666298ff6c5a161b4ef33030c9dcb5 (diff) | |
download | palemoon-gre-a89ae67838277643eacac8e5e17b833835578637.tar.gz |
Synchronously read the session file if the session need to be restored at startup.
Diffstat (limited to 'browser')
-rw-r--r-- | browser/components/sessionstore/nsSessionStartup.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/browser/components/sessionstore/nsSessionStartup.js b/browser/components/sessionstore/nsSessionStartup.js index 024246619..7f07e9050 100644 --- a/browser/components/sessionstore/nsSessionStartup.js +++ b/browser/components/sessionstore/nsSessionStartup.js @@ -77,9 +77,14 @@ SessionStartup.prototype = { return; } - _SessionFile.read().then( - this._onSessionFileRead.bind(this) - ); + if (Services.prefs.getBoolPref("browser.sessionstore.resume_session_once") || + Services.prefs.getIntPref("browser.startup.page") == 3) { + this._ensureInitialized(); + } else { + _SessionFile.read().then( + this._onSessionFileRead.bind(this) + ); + } }, // Wrap a string as a nsISupports |