Bug 767957 - Remove dead null-check for shistory in {push,replace}State. r=bz
authorJustin Lebar <justin.lebar@gmail.com>
Tue, 26 Jun 2012 17:18:10 +0200
changeset 97701 00bef3ccdd2ba9e1470305bae201df85185f72ed
parent 97700 941774f975ac18bc3076b3c4474c02c3829ebb48
child 97702 c94c8777d7ebfb8f084fa0f8a35a68c52b0e5d21
push id22993
push useremorley@mozilla.com
push dateWed, 27 Jun 2012 10:31:27 +0000
treeherdermozilla-central@1a56f1f011c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs767957
milestone16.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 767957 - Remove dead null-check for shistory in {push,replace}State. r=bz
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9854,27 +9854,16 @@ nsDocShell::AddState(nsIVariant *aData, 
             mCurrentURI->Equals(newURI, &equalURIs);
         }
         else {
             equalURIs = false;
         }
 
     } // end of same-origin check
 
-    nsCOMPtr<nsISHistory> sessionHistory = mSessionHistory;
-    if (!sessionHistory) {
-        // Get the handle to SH from the root docshell
-        GetRootSessionHistory(getter_AddRefs(sessionHistory));
-    }
-    NS_ENSURE_TRUE(sessionHistory, NS_ERROR_FAILURE);
-
-    nsCOMPtr<nsISHistoryInternal> shInternal =
-        do_QueryInterface(sessionHistory, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
     // Step 3: Create a new entry in the session history. This will erase
     // all SHEntries after the new entry and make this entry the current
     // one.  This operation may modify mOSHE, which we need later, so we
     // keep a reference here.
     NS_ENSURE_TRUE(mOSHE, NS_ERROR_FAILURE);
     nsCOMPtr<nsISHEntry> oldOSHE = mOSHE;
 
     mLoadType = LOAD_PUSHSTATE;