Bug 421067: 'Try Again' after a DNS error sometimes loads previous page, not the one that failed to load, patch by Michal Novotny <michal@allpeers.com>, r+sr=bzbarsky, a=schrep

git-svn-id: svn://10.0.0.236/trunk@250183 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com
2008-04-14 01:36:04 +00:00
parent dd5bb26dfd
commit a32c6fcf4a
3 changed files with 7 additions and 2 deletions

View File

@@ -3221,11 +3221,13 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL,
if (mSessionHistory && !mLSHE) {
PRInt32 idx;
mSessionHistory->GetRequestedIndex(&idx);
if (idx == -1)
mSessionHistory->GetIndex(&idx);
nsCOMPtr<nsIHistoryEntry> entry;
mSessionHistory->GetEntryAtIndex(idx, PR_FALSE,
getter_AddRefs(entry));
mLSHE = do_QueryInterface(entry);
}
nsCAutoString url;