NS_ConvertUTF8toUCS2 srcString(src); const PRUnichar* formatString[1] = { srcString.get() };
NS_ConvertUTF8toUTF16 srcString(src); const PRUnichar* formatString[] = { srcString.get() };
ImageListener::OnStopRequest(nsIRequest* request, nsISupports *ctxt,                             nsresult status){  NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);  nsImageDocument *imgDoc = (nsImageDocument*)mDocument.get();  imgDoc->UpdateTitleAndCharset();    nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(imgDoc->mImageContent);  if (imageLoader) {    imageLoader->RemoveObserver(imgDoc);  }  if (NS_FAILED(status) && imgDoc->mStringBundle) {    nsCAutoString src;    imgDoc->mDocumentURI->GetSpec(src);    NS_ConvertUTF8toUCS2 srcString(src);    const PRUnichar* formatString[1] = { srcString.get() };    nsXPIDLString errorMsg;    NS_NAMED_LITERAL_STRING(str, "InvalidImage");    imgDoc->mStringBundle->FormatStringFromName(str.get(), formatString, 1,                                        getter_Copies(errorMsg));        imgDoc->mImageContent->SetAttr(kNameSpaceID_None, nsHTMLAtoms::alt, errorMsg, PR_FALSE);  }  return nsMediaDocumentStreamListener::OnStopRequest(request, ctxt, status);}