NS_ConvertASCIItoUCS2 from_w(aSrcContentType); NS_ConvertASCIItoUCS2 to_w(aOutContentType);
nsDocumentOpenInfo::ConvertData(nsIRequest *request,                                nsIURIContentListener* aListener,                                const nsACString& aSrcContentType,                                const nsACString& aOutContentType){  LOG(("[0x%p] nsDocumentOpenInfo::ConvertData from '%s' to '%s'", this,       PromiseFlatCString(aSrcContentType).get(),       PromiseFlatCString(aOutContentType).get()));  NS_PRECONDITION(aSrcContentType != aOutContentType,                  "ConvertData called when the two types are the same!");  nsresult rv = NS_OK;  nsCOMPtr<nsIStreamConverterService> StreamConvService =     do_GetService(kStreamConverterServiceCID, &rv);  if (NS_FAILED(rv)) return rv;  LOG(("  Got converter service"));    NS_ConvertASCIItoUCS2 from_w(aSrcContentType);  NS_ConvertASCIItoUCS2 to_w(aOutContentType);        // When applying stream decoders, it is necessary to "insert" an   // intermediate nsDocumentOpenInfo instance to handle the targeting of  // the "final" stream or streams.  //  // For certain content types (ie. multi-part/x-mixed-replace) the input  // stream is split up into multiple destination streams.  This  // intermediate instance is used to target these "decoded" streams...  //  nsCOMPtr<nsDocumentOpenInfo> nextLink =    new nsDocumentOpenInfo(m_originalContext, mIsContentPreferred, mURILoader);  if (!nextLink) return NS_ERROR_OUT_OF_MEMORY;  LOG(("  Downstream DocumentOpenInfo would be: 0x%p", nextLink.get()));    // Make sure nextLink starts with the contentListener that said it wanted the  // results of this decode.  nextLink->m_contentListener = aListener;  // Also make sure it has to look for a stream listener to pump data into.  nextLink->m_targetStreamListener = nsnull;  // Make sure that nextLink treats the data as aOutContentType when  // dispatching; that way even if the stream converters don't change the type  // on the channel we will still do the right thing.  If aOutContentType is  // */*, that's OK -- that will just indicate to nextLink that it should get  // the type off the channel.  nextLink->mContentType = aOutContentType;  // The following call sets m_targetStreamListener to the input end of the  // stream converter and sets the output end of the stream converter to  // nextLink.  As we pump data into m_targetStreamListener the stream  // converter will convert it and pass the converted data to nextLink.  return StreamConvService->AsyncConvertData(from_w.get(),                                              to_w.get(),                                              nextLink,                                              request,                                             getter_AddRefs(m_targetStreamListener));}