nsresult rv; nsCOMPtr<nsIStringBundleService> sbs = do_GetService(kStringBundleServiceCID, &rv); if (NS_FAILED(rv)) return rv; nsXPIDLString msg; rv = sbs->FormatStatusMessage(aStatus, aStatusArg, getter_Copies(msg)); if (NS_FAILED(rv)) return rv; FireOnStatusChange(this, aRequest, aStatus, msg); } return NS_OK;
if (nsnull != m_Observer) {  (void) m_Observer->OnStatus(aURL, aMsg); }  return rv;
NS_IMETHODIMP nsDocLoaderImpl::OnStatus(nsIRequest* aRequest, nsISupports* ctxt,                                         nsresult aStatus, const PRUnichar* aStatusArg){  //  // Fire progress notifications out to any registered nsIWebProgressListeners  //  if (aStatus) {    // Remember the current status for this request    nsRequestInfo *info;    info = GetRequestInfo(aRequest);    if (info) {      PRBool uploading = (aStatus == nsITransport::STATUS_WRITING ||                          aStatus == nsISocketTransport::STATUS_SENDING_TO);      // If switching from uploading to downloading (or vice versa), then we      // need to reset our progress counts.  This is designed with HTTP form      // submission in mind, where an upload is performed followed by download      // of possibly several documents.      if (info->mUploading != uploading) {        mCurrentSelfProgress  = mMaxSelfProgress  = 0;        mCurrentTotalProgress = mMaxTotalProgress = 0;        info->mUploading = uploading;        info->mCurrentProgress = 0;        info->mMaxProgress = 0;      }    }        nsresult rv;    nsCOMPtr<nsIStringBundleService> sbs = do_GetService(kStringBundleServiceCID, &rv);    if (NS_FAILED(rv)) return rv;    nsXPIDLString msg;    rv = sbs->FormatStatusMessage(aStatus, aStatusArg, getter_Copies(msg));    if (NS_FAILED(rv)) return rv;    FireOnStatusChange(this, aRequest, aStatus, msg);  }  return NS_OK;}