Fix bug 128379, "Reload login page let you into Siebel app", a=jdunn

git-svn-id: svn://10.0.0.236/branches/SUN_6_2_1_BRANCH@116356 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joe.chou%sun.com
2002-03-12 00:40:03 +00:00
parent 49204ba15b
commit b85f489d4d

View File

@@ -405,6 +405,31 @@ nsSHistory::RemoveSHistoryListener(nsISHistoryListener * aListener)
return NS_OK;
}
/* Replace an entry in the History list at a particular index.
* Do not update index or count.
*/
NS_IMETHODIMP
nsSHistory::ReplaceEntry(PRInt32 aIndex, nsISHEntry * aReplaceEntry)
{
NS_ENSURE_ARG(aReplaceEntry);
nsresult rv;
nsCOMPtr<nsISHTransaction> currentTxn;
if (!mListRoot) // Session History is not initialised.
return NS_ERROR_FAILURE;
rv = GetTransactionAtIndex(aIndex, getter_AddRefs(currentTxn));
if(currentTxn)
{
// Set the replacement entry in the transaction
rv = currentTxn->SetSHEntry(aReplaceEntry);
rv = currentTxn->SetPersist(PR_TRUE);
}
return rv;
}
//*****************************************************************************
// nsSHistory: nsIWebNavigation
//*****************************************************************************