зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
77a692ea50
Коммит
fc1624e95f
|
@ -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;
|
||||
|
|
|
@ -80,7 +80,9 @@ interface nsISHistory: nsISupports
|
|||
|
||||
/**
|
||||
* A readonly property of the interface that returns
|
||||
* the index of the last document that started to load.
|
||||
* the index of the last document that started to load and
|
||||
* didn't finished yet. When document finishes the loading
|
||||
* value -1 is returned.
|
||||
*/
|
||||
readonly attribute long requestedIndex;
|
||||
|
||||
|
|
|
@ -1054,6 +1054,7 @@ nsSHistory::UpdateIndex()
|
|||
mIndex = mRequestedIndex;
|
||||
}
|
||||
|
||||
mRequestedIndex = -1;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче