PRUnichar * url=nsnull;
const PRUnichar * url;
nsSessionHistory::Goto(PRInt32 aGotoIndex, nsIWebShell * prev){   nsresult rv = NS_OK;   PRBool result = PR_FALSE;   int prevIndex = 0;   if ((aGotoIndex < 0) ||  (aGotoIndex >= mHistoryLength))      return NS_ERROR_NULL_POINTER;//   prevIndex = mHistoryCurrentIndex;   nsHistoryEntry * hPrevEntry=nsnull, * hCurrentEntry = nsnull;   //get a handle to the current page to be passed to nsHistoryEntry   // as the previous page.//   hPrevEntry = (nsHistoryEntry *)mHistoryEntries.ElementAt(prevIndex);   hCurrentEntry = (nsHistoryEntry *) mHistoryEntries.ElementAt(aGotoIndex);   // Set the flag that indicates that we are currently   // traversing with it the history   mIsLoadingDoc = PR_TRUE;   mHistoryEntryInLoad = hCurrentEntry;  //Load the page   PRUnichar * url=nsnull;   hCurrentEntry->GetURL(&url);   nsString  urlString(url);   if (APP_DEBUG) printf("nsSessionHistory::Goto, Trying to load URL %s\n", urlString.ToNewCString());  //   prev->LoadURL(url);  if (hCurrentEntry != nsnull)     result = hCurrentEntry->Load(prev);     if (!result) {   mIsLoadingDoc = PR_FALSE;   mHistoryEntryInLoad = (nsHistoryEntry *) nsnull;       }  #if 0  //Update the current & previous indices accordingly.  if (!rv)    mHistoryCurrentIndex = aGotoIndex;  else    mHistoryCurrentIndex = prevIndex;#endif   mHistoryCurrentIndex = aGotoIndex;}