nsCOMPtr<nsIUnicharInputStream> input; nsresult rv = NS_NewStringUnicharInputStream(getter_AddRefs(input), &aBuffer, PR_FALSE); if (NS_FAILED(rv)) { return rv; }
NS_ASSERTION(! mScannerInited, "already have scanner");
CSSParserImpl::InitScanner(const nsAString& aBuffer, nsIURI* aSheetURI,                           PRUint32 aLineNumber, nsIURI* aBaseURI){  // Having it not own the string is OK since the caller will hold on to  // the stream until we're done parsing.  nsCOMPtr<nsIUnicharInputStream> input;  nsresult rv = NS_NewStringUnicharInputStream(getter_AddRefs(input),                                               &aBuffer, PR_FALSE);  if (NS_FAILED(rv)) {    return rv;  }  return InitScanner(input, aSheetURI, aLineNumber, aBaseURI);}