зеркало из https://github.com/mozilla/pjs.git
Bug 302115 "Try again" on XUL error page loads wrong thing after going back
r=bryner sr=bz
This commit is contained in:
Родитель
cfe8343d68
Коммит
93560d613c
|
@ -3002,6 +3002,17 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL,
|
||||||
mURIResultedInDocument = PR_TRUE;
|
mURIResultedInDocument = PR_TRUE;
|
||||||
OnNewURI(aURI, nsnull, mLoadType, PR_TRUE, PR_FALSE);
|
OnNewURI(aURI, nsnull, mLoadType, PR_TRUE, PR_FALSE);
|
||||||
}
|
}
|
||||||
|
// Be sure to have a correct mLSHE, it may have been cleared by
|
||||||
|
// EndPageLoad. See bug 302115.
|
||||||
|
if (mSessionHistory && !mLSHE) {
|
||||||
|
PRInt32 idx;
|
||||||
|
mSessionHistory->GetRequestedIndex(&idx);
|
||||||
|
nsCOMPtr<nsIHistoryEntry> entry;
|
||||||
|
mSessionHistory->GetEntryAtIndex(idx, PR_FALSE,
|
||||||
|
getter_AddRefs(entry));
|
||||||
|
mLSHE = do_QueryInterface(entry);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
nsCAutoString url;
|
nsCAutoString url;
|
||||||
nsCAutoString charset;
|
nsCAutoString charset;
|
||||||
|
|
|
@ -62,7 +62,7 @@ interface nsISimpleEnumerator;
|
||||||
#define NS_SHISTORY_CONTRACTID "@mozilla.org/browser/shistory;1"
|
#define NS_SHISTORY_CONTRACTID "@mozilla.org/browser/shistory;1"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
[scriptable, uuid(7294FE9B-14D8-11D5-9882-00C04FA02F40)]
|
[scriptable, uuid(9883609F-CDD8-4d83-9B55-868FF08AD433)]
|
||||||
interface nsISHistory: nsISupports
|
interface nsISHistory: nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -78,6 +78,12 @@ interface nsISHistory: nsISupports
|
||||||
*/
|
*/
|
||||||
readonly attribute long index;
|
readonly attribute long index;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A readonly property of the interface that returns
|
||||||
|
* the index of the last document that started to load.
|
||||||
|
*/
|
||||||
|
readonly attribute long requestedIndex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A read/write property of the interface, used to Get/Set
|
* A read/write property of the interface, used to Get/Set
|
||||||
* the maximum number of toplevel documents, session history
|
* the maximum number of toplevel documents, session history
|
||||||
|
|
|
@ -343,11 +343,20 @@ nsSHistory::GetCount(PRInt32 * aResult)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSHistory::GetIndex(PRInt32 * aResult)
|
nsSHistory::GetIndex(PRInt32 * aResult)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aResult);
|
NS_PRECONDITION(aResult, "null out param?");
|
||||||
*aResult = mIndex;
|
*aResult = mIndex;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get the requestedIndex */
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsSHistory::GetRequestedIndex(PRInt32 * aResult)
|
||||||
|
{
|
||||||
|
NS_PRECONDITION(aResult, "null out param?");
|
||||||
|
*aResult = mRequestedIndex;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSHistory::GetEntryAtIndex(PRInt32 aIndex, PRBool aModifyIndex, nsISHEntry** aResult)
|
nsSHistory::GetEntryAtIndex(PRInt32 aIndex, PRBool aModifyIndex, nsISHEntry** aResult)
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче