mHintCharset = aCharset; mHintCharsetSource= aSource;  nsString* s = (nsString*) mHistory.ElementAt(mHistoryIndex);  nsresult rv = NS_OK; if(s) { char* url = s->ToNewCString(); if(url) { mHistoryIndex--; rv =  this->RefreshURL((const char*)url,0,PR_FALSE); delete [] url;
nsCOMPtr<nsIContentViewer> cv; NS_ENSURE_SUCCESS(GetContentViewer(getter_AddRefs(cv)), NS_ERROR_FAILURE); if (cv) { nsCOMPtr<nsIMarkupDocumentViewer> muDV = do_QueryInterface(cv); if (muDV) { PRInt32 hint; muDV->GetHintCharacterSetSource(&hint); if( aSource > hint ) { muDV->SetHintCharacterSet(nsDependentCString(aCharset)); muDV->SetHintCharacterSetSource(aSource); if(eCharsetReloadRequested != mCharsetReloadState) { mCharsetReloadState = eCharsetReloadRequested; return Reload(LOAD_FLAGS_CHARSET_CHANGE); } }
nsWebShell::ReloadDocument(const char* aCharset,                            nsCharsetSource aSource){  // XXX hack. kee the aCharset and aSource wait to pick it up  mHintCharset = aCharset;  mHintCharsetSource= aSource;    nsString* s = (nsString*) mHistory.ElementAt(mHistoryIndex);  nsresult rv = NS_OK;  if(s) {    char* url = s->ToNewCString();    if(url) {      mHistoryIndex--;      rv =  this->RefreshURL((const char*)url,0,PR_FALSE);      delete [] url;    }  }  return rv;}