Bug 832325 - Finish the initialization of nsSessionStartup correctly if permanent PB is turned on; r=ttaubert
authorEhsan Akhgari <ehsan@mozilla.com>
Sat, 23 Feb 2013 01:45:37 -0500
changeset 122731 a4631558de6cdd71d2c4a1c213272444341b7a63
parent 122730 7a332016b950d426a3c3242581d1b50690936ae0
child 122732 7318b2b26843be46cd059a76022d1b6b28825c0b
push id24356
push usergszorc@mozilla.com
push dateSun, 24 Feb 2013 01:00:12 +0000
treeherdermozilla-central@195e706140d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs832325
milestone22.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 832325 - Finish the initialization of nsSessionStartup correctly if permanent PB is turned on; r=ttaubert
browser/components/sessionstore/src/nsSessionStartup.js
--- a/browser/components/sessionstore/src/nsSessionStartup.js
+++ b/browser/components/sessionstore/src/nsSessionStartup.js
@@ -67,18 +67,21 @@ SessionStartup.prototype = {
 
 /* ........ Global Event Handlers .............. */
 
   /**
    * Initialize the component
    */
   init: function sss_init() {
     // do not need to initialize anything in auto-started private browsing sessions
-    if (PrivateBrowsingUtils.permanentPrivateBrowsing)
+    if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
+      this._initialized = true;
+      gOnceInitializedDeferred.resolve();
       return;
+    }
 
     _SessionFile.read().then(
       this._onSessionFileRead.bind(this)
     );
   },
 
   // Wrap a string as a nsISupports
   _createSupportsString: function ssfi_createSupportsString(aData) {