Bug 530354 - No need to check for navigator:browser before initializing SessionStore, r=dao
authorMichael Kohler <michaelkohler@live.com>
Sun, 22 Nov 2009 08:28:00 -0800
changeset 35695 10c98bccd40bc6da00b94cd43f722390212743aa
parent 35694 b259db01f88c05a4e91331b6a0f63367ec419fd0
child 35696 bc0849430750575ea1e08a4ce81241f62da02103
push id10682
push userphilringnalda@gmail.com
push dateMon, 14 Dec 2009 02:11:07 +0000
treeherdermozilla-central@bc0849430750 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs530354
milestone1.9.3a1pre
Bug 530354 - No need to check for navigator:browser before initializing SessionStore, r=dao
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1294,24 +1294,22 @@ function delayedStartup(isLoadingBlank, 
     Components.utils.reportError("Failed to init content pref service:\n" + ex);
   }
 
   let NP = {};
   Cu.import("resource:///modules/NetworkPrioritizer.jsm", NP);
   NP.trackBrowserWindow(window);
 
   // initialize the session-restore service (in case it's not already running)
-  if (document.documentElement.getAttribute("windowtype") == "navigator:browser") {
-    try {
-      var ss = Cc["@mozilla.org/browser/sessionstore;1"].
-               getService(Ci.nsISessionStore);
-      ss.init(window);
-    } catch(ex) {
-      dump("nsSessionStore could not be initialized: " + ex + "\n");
-    }
+  try {
+    Cc["@mozilla.org/browser/sessionstore;1"]
+      .getService(Ci.nsISessionStore)
+      .init(window);
+  } catch (ex) {
+    dump("nsSessionStore could not be initialized: " + ex + "\n");
   }
 
   // bookmark-all-tabs command
   gBookmarkAllTabsHandler.init();
 
   // Attach a listener to watch for "command" events bubbling up from error
   // pages.  This lets us fix bugs like 401575 which require error page UI to
   // do privileged things, without letting error pages have any privilege