From 3c70b297c7be12b7d7e120de04a38f40b600928b Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 25 Jan 2020 09:14:03 -0500 Subject: 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 --- parser/html/nsHtml5TreeOperation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'parser/html/nsHtml5TreeOperation.cpp') diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp index d747f80a8..22c805859 100644 --- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -433,8 +433,9 @@ nsHtml5TreeOperation::CreateHTMLElement( RefPtr 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; -- cgit v1.2.3