Bug 640167 - Port Bug 630723 [Deferred session restore doesn't work with browser.session_restore.resume_from_crash = false]. r=Neil
authorMisak Khachatryan <misak.bugzilla@gmail.com>
Wed, 09 Mar 2011 21:15:23 +0400
changeset 7290 9164f554c96f9468b709d4fe8f58694717ec16b6
parent 7289 dec310aab8deb9a09c63627dfa4f586a2e3fbf2f
child 7291 e1e05d692fc4ff52c03cbbbd75e8dfd4303bb42b
push idunknown
push userunknown
push dateunknown
reviewersNeil
bugs640167, 630723
Bug 640167 - Port Bug 630723 [Deferred session restore doesn't work with browser.session_restore.resume_from_crash = false]. r=Neil
suite/common/src/nsSessionStartup.js
--- a/suite/common/src/nsSessionStartup.js
+++ b/suite/common/src/nsSessionStartup.js
@@ -97,19 +97,20 @@ SessionStartup.prototype = {
     var dirService = Components.classes["@mozilla.org/file/directory_service;1"]
                                .getService(Components.interfaces.nsIProperties);
     let sessionFile = dirService.get("ProfD", Components.interfaces.nsILocalFile);
     sessionFile.append("sessionstore.json");
 
     let doResumeSession = prefBranch.getBoolPref("sessionstore.resume_session_once") ||
                           prefBranch.getIntPref("startup.page") == 3;
 
-    // only read the session file if config allows possibility of restoring
     var resumeFromCrash = prefBranch.getBoolPref("sessionstore.resume_from_crash");
-    if ((!resumeFromCrash && !doResumeSession) || !sessionFile.exists())
+
+    // only continue if the session file exists
+    if (!sessionFile.exists())
       return;
 
     // get string containing session state
     this._iniString = this._readStateFile(sessionFile);
     if (!this._iniString)
       return;
 
     var initialState;