summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-03-12 21:03:25 +0100
committerGitHub <noreply@github.com>2018-03-12 21:03:25 +0100
commitf1f3b7b2fc66a25e9a3f0404fe53fd0cfe625537 (patch)
tree73c57947b8100dc12d78ce45ca489654c8c61355
parent5bc089af23666298ff6c5a161b4ef33030c9dcb5 (diff)
parenta89ae67838277643eacac8e5e17b833835578637 (diff)
downloadpalemoon-gre-f1f3b7b2fc66a25e9a3f0404fe53fd0cfe625537.tar.gz
Merge pull request #1640 from JustOff/PR_SessionStartup_sync_restore
Synchronously read the session file if the session need to be restored at startup
-rw-r--r--browser/components/sessionstore/nsSessionStartup.js11
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