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@140260 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -503,7 +503,7 @@ function onselect_loadURI(tree, columnName) {
|
||||
function getPropertyValue(properties, propName) {
|
||||
for (var i=0; i< properties.Count(); ++i) {
|
||||
var atom = properties.GetElementAt(i).QueryInterface(Components.interfaces.nsIAtom);
|
||||
var atomValue = atom.GetUnicode();
|
||||
var atomValue = atom.toString();
|
||||
if (atomValue.substr(0, propName.length) == propName)
|
||||
return atomValue.substr(propName.length);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ XBLBindings.prototype =
|
||||
|
||||
while (urls.hasMoreElements()) {
|
||||
var item = urls.getNext();
|
||||
var url = item.QueryInterface(Components.interfaces.nsIAtom).GetUnicode();
|
||||
var url = item.QueryInterface(Components.interfaces.nsIAtom).toString();
|
||||
var menu = document.createElement("menuitem");
|
||||
menu.setAttribute("value", url);
|
||||
menu.setAttribute("label", url);
|
||||
|
||||
@@ -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