Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
This commit is contained in:
@@ -616,11 +616,10 @@ bool nsHTMLDocument::ResolveName(JSContext* aCx, const nsAString& aName,
|
||||
}
|
||||
|
||||
void nsHTMLDocument::GetSupportedNames(nsTArray<nsString>& aNames) {
|
||||
for (auto iter = mIdentifierMap.Iter(); !iter.Done(); iter.Next()) {
|
||||
IdentifierMapEntry* entry = iter.Get();
|
||||
if (entry->HasNameElement() ||
|
||||
entry->HasIdElementExposedAsHTMLDocumentProperty()) {
|
||||
aNames.AppendElement(entry->GetKeyAsString());
|
||||
for (const auto& entry : mIdentifierMap) {
|
||||
if (entry.HasNameElement() ||
|
||||
entry.HasIdElementExposedAsHTMLDocumentProperty()) {
|
||||
aNames.AppendElement(entry.GetKeyAsString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user