nsString* str = new nsString(aAttributeValue);
nsString* str = new nsAutoString(aAttributeValue);
CSSParserImpl::ParseStyleAttribute(const nsAReadableString& aAttributeValue,                                   nsIURI*                  aBaseURL,                                   nsIStyleRule**           aResult){  NS_ASSERTION(nsnull != aBaseURL, "need base URL");  // XXXldb XXXperf nsIUnicharInputStream is horrible!  It makes us make  // a copy.  nsString* str = new nsString(aAttributeValue);  if (nsnull == str) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsIUnicharInputStream* input = nsnull;  nsresult rv = NS_NewStringUnicharInputStream(&input, str);  if (NS_OK != rv) {    delete str;    return rv;  }  rv = InitScanner(input, aBaseURL);  NS_RELEASE(input);  if (! NS_SUCCEEDED(rv)) {    return rv;  }  mSection = eCSSSection_General;  PRInt32 errorCode = NS_OK;  // In quirks mode, allow style declarations to have braces or not  // (bug 99554).  PRBool haveBraces;  if (mNavQuirkMode) {    GetToken(errorCode, PR_TRUE);    haveBraces = eCSSToken_Symbol == mToken.mType &&                 '{' == mToken.mSymbol;    UngetToken();  }  else {    haveBraces = PR_FALSE;  }  nsICSSDeclaration* declaration =      ParseDeclarationBlock(errorCode, haveBraces);  if (nsnull != declaration) {    // Create a style rule for the delcaration    nsICSSStyleRule* rule = nsnull;    NS_NewCSSStyleRule(&rule, nsCSSSelector());    rule->SetDeclaration(declaration);    *aResult = rule;    NS_RELEASE(declaration);  }  else {    *aResult = nsnull;  }  ReleaseScanner();  return NS_OK;}