Bug 1225923 - part 5 - fix AppendElement(nsDependentAtomString(...)) calls; r=bz
The intent here is to copy the dependent string. We can make that behavior more explicit by using the ToString method of nsIAtom instead.
This commit is contained in:
@@ -309,9 +309,10 @@ HTMLOptionsCollection::GetSupportedNames(unsigned aFlags,
|
||||
}
|
||||
}
|
||||
|
||||
aNames.SetCapacity(atoms.Length());
|
||||
for (uint32_t i = 0; i < atoms.Length(); ++i) {
|
||||
aNames.AppendElement(nsDependentAtomString(atoms[i]));
|
||||
uint32_t atomsLen = atoms.Length();
|
||||
nsString* names = aNames.AppendElements(atomsLen);
|
||||
for (uint32_t i = 0; i < atomsLen; ++i) {
|
||||
atoms[i]->ToString(names[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user