landing attempt #2 for 195262 - support for static atoms, and converting atoms over to UTF8 to reduce bloat - now without performance regressions!
sr=darin, r=dbaron git-svn-id: svn://10.0.0.236/trunk@183694 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -73,9 +73,7 @@ void TX_ToLowerCase(const nsAString& aSource, nsAString& aDest);
|
||||
*/
|
||||
static PRBool TX_StringEqualsAtom(const nsAString& aString, nsIAtom* aAtom)
|
||||
{
|
||||
const PRUnichar* atom;
|
||||
aAtom->GetUnicode(&atom);
|
||||
return aString.Equals(atom);
|
||||
return aAtom->Equals(aString);
|
||||
};
|
||||
|
||||
#endif // txStringUtils_h__
|
||||
|
||||
@@ -88,12 +88,12 @@ double txNameTest::getDefaultPriority()
|
||||
void txNameTest::toString(nsAString& aDest)
|
||||
{
|
||||
if (mPrefix) {
|
||||
const PRUnichar* prefix;
|
||||
mPrefix->GetUnicode(&prefix);
|
||||
aDest.Append(nsDependentString(prefix));
|
||||
nsAutoString prefix;
|
||||
mPrefix->ToString(prefix);
|
||||
aDest.Append(prefix);
|
||||
aDest.Append(PRUnichar(':'));
|
||||
}
|
||||
const PRUnichar* localName;
|
||||
mLocalName->GetUnicode(&localName);
|
||||
aDest.Append(nsDependentString(localName));
|
||||
nsAutoString localName;
|
||||
mLocalName->ToString(localName);
|
||||
aDest.Append(localName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user