Clean up of Session History apis. Corresponding changes to the users of SH. r=mcafee. No bug #.

git-svn-id: svn://10.0.0.236/trunk@51544 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
radha%netscape.com
1999-10-22 20:48:07 +00:00
parent b21e040071
commit a285ab741e
7 changed files with 85 additions and 111 deletions

View File

@@ -3678,7 +3678,6 @@ nsresult nsWebShell::CheckForTrailingSlash(nsIURI* aURL)
const PRUnichar * title=nsnull;
PRInt32 curIndex=0;
nsresult rv;
nsAutoString newURL;
/* Get current history index and url for it */
rv = mSHist->GetCurrentIndex(&curIndex);
@@ -3686,9 +3685,7 @@ nsresult nsWebShell::CheckForTrailingSlash(nsIURI* aURL)
/* Get the url that netlib passed us */
char* spec;
aURL->GetSpec(&spec);
newURL = (spec);
nsCRT::free(spec);
//Get the title from webshell
rv = GetTitle(&title);
@@ -3697,8 +3694,9 @@ nsresult nsWebShell::CheckForTrailingSlash(nsIURI* aURL)
nsString titleStr(title);
mSHist->SetTitleForIndex(curIndex, title);
// Replace the top most history entry with the new url
mSHist->SetURLForIndex(curIndex, newURL.GetUnicode());
mSHist->SetURLForIndex(curIndex, spec);
}
nsCRT::free(spec);
return NS_OK;