mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Bug 1355787 - nsIdentifierMapEntry should let one to use either strings or atoms as keys to avoid slow string assignments when possible.
Tag #1375
This commit is contained in:
parent
c21eecd1b3
commit
15f6d2efda
4 changed files with 76 additions and 22 deletions
|
|
@ -319,8 +319,7 @@ ShadowRoot::GetElementsByTagNameNS(const nsAString& aNamespaceURI,
|
|||
void
|
||||
ShadowRoot::AddToIdTable(Element* aElement, nsIAtom* aId)
|
||||
{
|
||||
nsIdentifierMapEntry *entry =
|
||||
mIdentifierMap.PutEntry(nsDependentAtomString(aId));
|
||||
nsIdentifierMapEntry* entry = mIdentifierMap.PutEntry(aId);
|
||||
if (entry) {
|
||||
entry->AddIdElement(aElement);
|
||||
}
|
||||
|
|
@ -329,8 +328,7 @@ ShadowRoot::AddToIdTable(Element* aElement, nsIAtom* aId)
|
|||
void
|
||||
ShadowRoot::RemoveFromIdTable(Element* aElement, nsIAtom* aId)
|
||||
{
|
||||
nsIdentifierMapEntry *entry =
|
||||
mIdentifierMap.GetEntry(nsDependentAtomString(aId));
|
||||
nsIdentifierMapEntry* entry = mIdentifierMap.GetEntry(aId);
|
||||
if (entry) {
|
||||
entry->RemoveIdElement(aElement);
|
||||
if (entry->IsEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue