<http://webkit.org/b/86667>
Reviewed by Antti Koivisto.
Pass AtomicString by const reference to avoid useless ref count churn
in AtomicHTMLToken() and AtomicXMLToken().
* html/parser/HTMLToken.h:
(WebCore::AtomicHTMLToken::AtomicHTMLToken):
* xml/parser/MarkupTokenBase.h:
(WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
* xml/parser/XMLToken.h:
(WebCore::AtomicXMLToken::AtomicXMLToken):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117473
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-05-17 Andreas Kling <kling@webkit.org>
+
+ Parser: Avoid unnecessary ref count churn in token constructors.
+ <http://webkit.org/b/86667>
+
+ Reviewed by Antti Koivisto.
+
+ Pass AtomicString by const reference to avoid useless ref count churn
+ in AtomicHTMLToken() and AtomicXMLToken().
+
+ * html/parser/HTMLToken.h:
+ (WebCore::AtomicHTMLToken::AtomicHTMLToken):
+ * xml/parser/MarkupTokenBase.h:
+ (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
+ * xml/parser/XMLToken.h:
+ (WebCore::AtomicXMLToken::AtomicXMLToken):
+
2012-05-16 Andreas Kling <kling@webkit.org>
Make PluginInfoStore properly thread-safe.
public:
AtomicHTMLToken(HTMLToken& token) : AtomicMarkupTokenBase<HTMLToken>(&token) { }
- AtomicHTMLToken(HTMLTokenTypes::Type type, AtomicString name, const Vector<Attribute>& attributes = Vector<Attribute>())
+ AtomicHTMLToken(HTMLTokenTypes::Type type, const AtomicString& name, const Vector<Attribute>& attributes = Vector<Attribute>())
: AtomicMarkupTokenBase<HTMLToken>(type, name, attributes)
{
}
}
}
- AtomicMarkupTokenBase(typename Token::Type::Type type, AtomicString name, const Vector<Attribute>& attributes = Vector<Attribute>())
+ AtomicMarkupTokenBase(typename Token::Type::Type type, const AtomicString& name, const Vector<Attribute>& attributes = Vector<Attribute>())
: m_type(type)
, m_name(name)
, m_externalCharacters(0)
}
}
- AtomicXMLToken(XMLTokenTypes::Type type, AtomicString name, const Vector<Attribute>& attributes = Vector<Attribute>())
+ AtomicXMLToken(XMLTokenTypes::Type type, const AtomicString& name, const Vector<Attribute>& attributes = Vector<Attribute>())
: AtomicMarkupTokenBase<XMLToken>(type, name, attributes)
{
}