Bug 675359 - Follow-up fix for bug 588506: Remove unused code. r=zpao
authorJez Ng <jezreel@gmail.com>
Wed, 03 Aug 2011 11:20:32 -0700
changeset 73831 522205a03a72c9b61f17c9c44659fb6b94b37f99
parent 73830 6458c6116c973284fad801c6bc815bf5915adbcc
child 73832 11c3b74e18e7ced94dd60a506fddbda65632d6ae
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewerszpao
bugs675359, 588506
milestone8.0a1
Bug 675359 - Follow-up fix for bug 588506: Remove unused code. r=zpao
browser/components/sessionstore/content/aboutSessionRestore.js
--- a/browser/components/sessionstore/content/aboutSessionRestore.js
+++ b/browser/components/sessionstore/content/aboutSessionRestore.js
@@ -43,22 +43,18 @@ var gTreeData;
 
 // Page initialization
 
 window.onload = function() {
   // the crashed session state is kept inside a textbox so that SessionStore picks it up
   // (for when the tab is closed or the session crashes right again)
   var sessionData = document.getElementById("sessionData");
   if (!sessionData.value) {
-    var ss = Cc["@mozilla.org/browser/sessionstartup;1"].getService(Ci.nsISessionStartup);
-    sessionData.value = ss.state;
-    if (!sessionData.value) {
-      document.getElementById("errorTryAgain").disabled = true;
-      return;
-    }
+    document.getElementById("errorTryAgain").disabled = true;
+    return;
   }
 
   // remove unneeded braces (added for compatibility with Firefox 2.0 and 3.0)
   if (sessionData.value.charAt(0) == '(')
     sessionData.value = sessionData.value.slice(1, -1);
   try {
     gStateObject = JSON.parse(sessionData.value);
   }