Bug 1430951 - Avoid element name atomizing to improve performance of LookupCustomElementDefinition

Since we are dealing with the element (nodeInfo->LocalName() and NameAtom() are the same value), we could use nodeInfo->NameAtom() instead.

Tag UXP Issue #1344
This commit is contained in:
Gaming4JC 2020-01-25 09:14:03 -05:00 committed by Roy Tam
commit 57da7a1935
7 changed files with 16 additions and 11 deletions

View file

@ -433,8 +433,9 @@ nsHtml5TreeOperation::CreateHTMLElement(
RefPtr<nsIAtom> typeAtom =
isValue.IsEmpty() ? tagAtom : NS_Atomize(isValue);
MOZ_ASSERT(nodeInfo->NameAtom()->Equals(nodeInfo->LocalName()));
definition = nsContentUtils::LookupCustomElementDefinition(document,
nodeInfo->LocalName(), nodeInfo->NamespaceID(), typeAtom);
nodeInfo->NameAtom(), nodeInfo->NamespaceID(), typeAtom);
if (definition) {
willExecuteScript = true;