Bug 1246846 (part 1) - Avoid nsTHashtable::RawRemoveEntry() in dom/. r=bz.

This assumes that it's safe to possibly shrink the tables after the removal,
i.e. there are no surprising subtleties with how these tables are managed.

--HG--
extra : rebase_source : 2012becaa759d4330910534375b7ac2a9839fe50
This commit is contained in:
Nicholas Nethercote 2016-02-09 13:52:21 +11:00
Родитель 462eb9a0d4
Коммит 8c78eddc4e
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -219,7 +219,7 @@ ShadowRoot::RemoveFromIdTable(Element* aElement, nsIAtom* aId)
if (entry) { if (entry) {
entry->RemoveIdElement(aElement); entry->RemoveIdElement(aElement);
if (entry->IsEmpty()) { if (entry->IsEmpty()) {
mIdentifierMap.RawRemoveEntry(entry); mIdentifierMap.RemoveEntry(entry);
} }
} }
} }

Просмотреть файл

@ -3003,7 +3003,7 @@ nsDocument::RemoveFromIdTable(Element *aElement, nsIAtom* aId)
++mExpandoAndGeneration.generation; ++mExpandoAndGeneration.generation;
} }
if (entry->IsEmpty()) { if (entry->IsEmpty()) {
mIdentifierMap.RawRemoveEntry(entry); mIdentifierMap.RemoveEntry(entry);
} }
} }

Просмотреть файл

@ -1832,7 +1832,7 @@ XULDocument::RemoveElementFromRefMap(Element* aElement)
if (!entry) if (!entry)
return; return;
if (entry->RemoveElement(aElement)) { if (entry->RemoveElement(aElement)) {
mRefMap.RawRemoveEntry(entry); mRefMap.RemoveEntry(entry);
} }
} }
} }