If the same page is being loaded twice, don't add it twice to session history.

This commit is contained in:
tbogard@aol.net
2000-04-17 02:17:42 +00:00
parent a10e804228
commit b8857086c4

View File

@@ -2640,11 +2640,18 @@ void nsDocShell::SetReferrerURI(nsIURI* aURI)
NS_IMETHODIMP nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI,
PRBool* aShouldAdd)
{
*aShouldAdd = PR_FALSE;
if((!mSessionHistory) || (IsFrame() && mInitialPageLoad))
{
*aShouldAdd = PR_FALSE;
return NS_OK;
}
if(mCurrentURI)
{
PRBool equals = PR_TRUE;
mCurrentURI->Equals(aURI, &equals);
if(equals)
return NS_OK;
}
*aShouldAdd = PR_TRUE;