Bug 767957 - Remove dead null-check for shistory in {push,replace}State. r=bz

This commit is contained in:
Justin Lebar
2012-06-26 17:18:10 +02:00
parent a3a8d59b2b
commit bb7b3288bd

View File

@@ -9859,17 +9859,6 @@ nsDocShell::AddState(nsIVariant *aData, const nsAString& aTitle,
} // 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