summaryrefslogtreecommitdiffstats
path: root/parser/html/nsHtml5StackNode.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-18 13:20:59 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:34 -0500
commit016a21c414f35e0d1af6ee2ffcc17224aab77637 (patch)
tree900b4fafbbd7d25bd9c605dcf934ad0b4009fdeb /parser/html/nsHtml5StackNode.cpp
parente387308d9b996542565175c7895724c86e24e0dc (diff)
downloadUXP-016a21c414f35e0d1af6ee2ffcc17224aab77637.tar
UXP-016a21c414f35e0d1af6ee2ffcc17224aab77637.tar.gz
UXP-016a21c414f35e0d1af6ee2ffcc17224aab77637.tar.lz
UXP-016a21c414f35e0d1af6ee2ffcc17224aab77637.tar.xz
UXP-016a21c414f35e0d1af6ee2ffcc17224aab77637.zip
Bug 1355769 - Avoid malloc for nsHtml5ElementName when processing a non-interned element name.
HTML Regen. Tag UXP Issue #1344
Diffstat (limited to 'parser/html/nsHtml5StackNode.cpp')
-rw-r--r--parser/html/nsHtml5StackNode.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/parser/html/nsHtml5StackNode.cpp b/parser/html/nsHtml5StackNode.cpp
index a29fb85d4..10b0192c0 100644
--- a/parser/html/nsHtml5StackNode.cpp
+++ b/parser/html/nsHtml5StackNode.cpp
@@ -103,35 +103,35 @@ nsHtml5StackNode::nsHtml5StackNode(int32_t flags, int32_t ns, nsIAtom* name, nsI
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node)
: flags(elementName->getFlags()),
- name(elementName->name),
- popName(elementName->name),
+ name(elementName->getName()),
+ popName(elementName->getName()),
ns(kNameSpaceID_XHTML),
node(node),
attributes(nullptr),
refcount(1)
{
MOZ_COUNT_CTOR(nsHtml5StackNode);
- MOZ_ASSERT(!elementName->isCustom(), "Don't use this constructor for custom elements.");
+ MOZ_ASSERT(elementName->isInterned(), "Don't use this constructor for custom elements.");
}
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node, nsHtml5HtmlAttributes* attributes)
: flags(elementName->getFlags()),
- name(elementName->name),
- popName(elementName->name),
+ name(elementName->getName()),
+ popName(elementName->getName()),
ns(kNameSpaceID_XHTML),
node(node),
attributes(attributes),
refcount(1)
{
MOZ_COUNT_CTOR(nsHtml5StackNode);
- MOZ_ASSERT(!elementName->isCustom(), "Don't use this constructor for custom elements.");
+ MOZ_ASSERT(elementName->isInterned(), "Don't use this constructor for custom elements.");
}
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node, nsIAtom* popName)
: flags(elementName->getFlags()),
- name(elementName->name),
+ name(elementName->getName()),
popName(popName),
ns(kNameSpaceID_XHTML),
node(node),
@@ -144,7 +144,7 @@ nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHa
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIAtom* popName, nsIContentHandle* node)
: flags(prepareSvgFlags(elementName->getFlags())),
- name(elementName->name),
+ name(elementName->getName()),
popName(popName),
ns(kNameSpaceID_SVG),
node(node),
@@ -157,7 +157,7 @@ nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIAtom* pop
nsHtml5StackNode::nsHtml5StackNode(nsHtml5ElementName* elementName, nsIContentHandle* node, nsIAtom* popName, bool markAsIntegrationPoint)
: flags(prepareMathFlags(elementName->getFlags(), markAsIntegrationPoint)),
- name(elementName->name),
+ name(elementName->getName()),
popName(popName),
ns(kNameSpaceID_MathML),
node(node),