aStatusFeedback->SetWebShell(mWebShell, mWindow);
if (aStatusFeedback) aStatusFeedback->SetWebShell(mWebShell, mWindow);
nsMessenger::SetWindow(nsIDOMWindow *aWin, nsIMsgStatusFeedback *aStatusFeedback){	if(!aWin)		return NS_ERROR_NULL_POINTER;  nsAutoString  webShellName("messagepane");  NS_IF_RELEASE(mWindow);  mWindow = aWin;  NS_ADDREF(aWin);#ifdef DEBUG  /* rhp - Needed to access the webshell to drive message display */  printf("nsMessenger::SetWindow(): Getting the webShell of interest...\n");#endif  nsCOMPtr<nsIScriptGlobalObject> globalObj( do_QueryInterface(aWin) );  if (!globalObj)   {    return NS_ERROR_FAILURE;  }  nsIWebShell *webShell = nsnull;  nsIWebShell *rootWebShell = nsnull;  globalObj->GetWebShell(&webShell);  if (nsnull == webShell)   {    return NS_ERROR_FAILURE;  }  webShell->GetRootWebShell(rootWebShell);  if (nsnull != rootWebShell)   {    nsresult rv = rootWebShell->FindChildWithName(webShellName.GetUnicode(), mWebShell);#ifdef NS_DEBUG    if (NS_SUCCEEDED(rv) && nsnull != mWebShell)        printf("nsMessenger::SetWindow(): Got the webShell %s.\n", (const char *) nsAutoCString(webShellName));    else        printf("nsMessenger::SetWindow(): Failed to find webshell %s.\n", (const char *) nsAutoCString(webShellName));#endif	if (mWebShell)	{		if (aStatusFeedback)		{			m_docLoaderObserver = do_QueryInterface(aStatusFeedback);			aStatusFeedback->SetWebShell(mWebShell, mWindow);			mWebShell->SetDocLoaderObserver(m_docLoaderObserver);            NS_WITH_SERVICE(nsIMsgMailSession, mailSession, kCMsgMailSessionCID, &rv);            if(NS_SUCCEEDED(rv))	            mailSession->SetTemporaryMsgStatusFeedback(aStatusFeedback);		}	}    NS_RELEASE(rootWebShell);  }  NS_RELEASE(webShell);  // libmime always converts to UTF-8 (both HTML and XML)  if (nsnull != mWebShell)   {	  nsAutoString aForceCharacterSet("UTF-8");	  mWebShell->SetForceCharacterSet(aForceCharacterSet.GetUnicode());  }  return NS_OK;}