nsCOMPtr<nsIUnicharInputStream> input; nsresult rv = NS_NewStringUnicharInputStream(getter_AddRefs(input), str); if (NS_FAILED(rv)) { delete str; return rv; }  rv = InitScanner(input, aSheetURL, 0, aBaseURL); if (NS_FAILED(rv)) { return rv; }  mSection = eCSSSection_General; nsresult errorCode = NS_OK;  if (eCSSProperty_UNKNOWN == aPropID) { NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID)); const PRUnichar *params[] = { propName.get() }; REPORT_UNEXPECTED_P(PEUnknownProperty, params); REPORT_UNEXPECTED(PEDeclDropped); OUTPUT_ERROR(); ReleaseScanner(); return NS_OK; }  mData.AssertInitialState(); mTempData.AssertInitialState(); aDeclaration->ExpandTo(&mData); nsresult result = NS_OK; if (ParseProperty(errorCode, aPropID)) { TransferTempData(aDeclaration, aPropID, PR_FALSE, aChanged); } else { NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID)); const PRUnichar *params[] = { propName.get() }; REPORT_UNEXPECTED_P(PEPropertyParsingError, params); REPORT_UNEXPECTED(PEDeclDropped); OUTPUT_ERROR(); ClearTempData(aPropID); NS_ASSERTION(errorCode != nsresult(-1), "-1 is no longer used for EOF"); result = errorCode; } CLEAR_ERROR();  aDeclaration->CompressFrom(&mData);  ReleaseScanner(); return result;
return PR_FALSE;
CSSParserImpl::ParseProperty(const nsCSSProperty aPropID,                             const nsAString& aPropValue,                             nsIURI* aSheetURL,                             nsIURI* aBaseURL,                             nsCSSDeclaration* aDeclaration,                             PRBool* aChanged){  NS_ASSERTION(nsnull != aBaseURL, "need base URL");  NS_ASSERTION(nsnull != aDeclaration, "Need declaration to parse into!");  *aChanged = PR_FALSE;  nsString* str = new nsAutoString(aPropValue);  if (!str) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsCOMPtr<nsIUnicharInputStream> input;  nsresult rv = NS_NewStringUnicharInputStream(getter_AddRefs(input), str);  if (NS_FAILED(rv)) {    delete str;    return rv;  }  rv = InitScanner(input, aSheetURL, 0, aBaseURL);  if (NS_FAILED(rv)) {    return rv;  }  mSection = eCSSSection_General;  nsresult errorCode = NS_OK;  if (eCSSProperty_UNKNOWN == aPropID) { // unknown property    NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID));    const PRUnichar *params[] = {      propName.get()    };    REPORT_UNEXPECTED_P(PEUnknownProperty, params);    REPORT_UNEXPECTED(PEDeclDropped);    OUTPUT_ERROR();    ReleaseScanner();    return NS_OK;  }    mData.AssertInitialState();  mTempData.AssertInitialState();  aDeclaration->ExpandTo(&mData);  nsresult result = NS_OK;  if (ParseProperty(errorCode, aPropID)) {    TransferTempData(aDeclaration, aPropID, PR_FALSE, aChanged);  } else {    NS_ConvertASCIItoUTF16 propName(nsCSSProps::GetStringValue(aPropID));    const PRUnichar *params[] = {      propName.get()    };    REPORT_UNEXPECTED_P(PEPropertyParsingError, params);    REPORT_UNEXPECTED(PEDeclDropped);    OUTPUT_ERROR();    ClearTempData(aPropID);    NS_ASSERTION(errorCode != nsresult(-1), "-1 is no longer used for EOF");    result = errorCode;  }  CLEAR_ERROR();    aDeclaration->CompressFrom(&mData);    ReleaseScanner();  return result;}