Bug 824107 - Session Data lost on startup if nsISessionStartup.sessionType is referenced before async load complete. r=dteller
authorMichael Kraft <morac99-firefox2@yahoo.com>
Sun, 06 Jan 2013 22:24:15 -0500
changeset 126993 d070668a08e3a2ee30a420300eede8d909691012
parent 126992 c9831bed6bb72997b34d934f79a1bcea75462af5
child 126994 870dca5f3fdcd0524c17741f4ac72f189ac7cf94
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdteller
bugs824107
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 824107 - Session Data lost on startup if nsISessionStartup.sessionType is referenced before async load complete. r=dteller
browser/components/sessionstore/src/nsSessionStartup.js
--- a/browser/components/sessionstore/src/nsSessionStartup.js
+++ b/browser/components/sessionstore/src/nsSessionStartup.js
@@ -77,18 +77,16 @@ SessionStartup.prototype = {
       return;
 
 #ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
     let pbs = Cc["@mozilla.org/privatebrowsing;1"].
               getService(Ci.nsIPrivateBrowsingService);
     if (pbs.lastChangedByCommandLine)
       return;
 #endif
-    // Session state is unknown until we read the file.
-    this._sessionType = null;
     _SessionFile.read().then(
       this._onSessionFileRead.bind(this)
     );
     debug("init launched");
   },
 
   // Wrap a string as a nsISupports
   _createSupportsString: function ssfi_createSupportsString(aData) {