summaryrefslogtreecommitdiffstats
path: root/parser/html
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-25 09:14:03 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:52 -0500
commit3c70b297c7be12b7d7e120de04a38f40b600928b (patch)
treefb5b7a509abe61a05bf6f3f88371271be4e5ccaa /parser/html
parent0cea94242a555b7a8a2d956412da809a514814f7 (diff)
downloadUXP-3c70b297c7be12b7d7e120de04a38f40b600928b.tar
UXP-3c70b297c7be12b7d7e120de04a38f40b600928b.tar.gz
UXP-3c70b297c7be12b7d7e120de04a38f40b600928b.tar.lz
UXP-3c70b297c7be12b7d7e120de04a38f40b600928b.tar.xz
UXP-3c70b297c7be12b7d7e120de04a38f40b600928b.zip
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
Diffstat (limited to 'parser/html')
-rw-r--r--parser/html/nsHtml5TreeOperation.cpp3
1 files changed, 2 insertions, 1 deletions
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<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;