Changeset 117473 in webkit


Ignore:
Timestamp:
May 17, 2012 11:57:16 AM (12 years ago)
Author:
kling@webkit.org
Message:

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):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117471 r117473  
     12012-05-17  Andreas Kling  <kling@webkit.org>
     2
     3        Parser: Avoid unnecessary ref count churn in token constructors.
     4        <http://webkit.org/b/86667>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Pass AtomicString by const reference to avoid useless ref count churn
     9        in AtomicHTMLToken() and AtomicXMLToken().
     10
     11        * html/parser/HTMLToken.h:
     12        (WebCore::AtomicHTMLToken::AtomicHTMLToken):
     13        * xml/parser/MarkupTokenBase.h:
     14        (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
     15        * xml/parser/XMLToken.h:
     16        (WebCore::AtomicXMLToken::AtomicXMLToken):
     17
    1182012-05-16  Andreas Kling  <kling@webkit.org>
    219
  • trunk/Source/WebCore/html/parser/HTMLToken.h

    r115645 r117473  
    8787    AtomicHTMLToken(HTMLToken& token) : AtomicMarkupTokenBase<HTMLToken>(&token) { }
    8888
    89     AtomicHTMLToken(HTMLTokenTypes::Type type, AtomicString name, const Vector<Attribute>& attributes = Vector<Attribute>())
     89    AtomicHTMLToken(HTMLTokenTypes::Type type, const AtomicString& name, const Vector<Attribute>& attributes = Vector<Attribute>())
    9090        : AtomicMarkupTokenBase<HTMLToken>(type, name, attributes)
    9191    {
  • trunk/Source/WebCore/xml/parser/MarkupTokenBase.h

    r115645 r117473  
    410410    }
    411411
    412     AtomicMarkupTokenBase(typename Token::Type::Type type, AtomicString name, const Vector<Attribute>& attributes = Vector<Attribute>())
     412    AtomicMarkupTokenBase(typename Token::Type::Type type, const AtomicString& name, const Vector<Attribute>& attributes = Vector<Attribute>())
    413413        : m_type(type)
    414414        , m_name(name)
  • trunk/Source/WebCore/xml/parser/XMLToken.h

    r115645 r117473  
    432432    }
    433433
    434     AtomicXMLToken(XMLTokenTypes::Type type, AtomicString name, const Vector<Attribute>& attributes = Vector<Attribute>())
     434    AtomicXMLToken(XMLTokenTypes::Type type, const AtomicString& name, const Vector<Attribute>& attributes = Vector<Attribute>())
    435435        : AtomicMarkupTokenBase<XMLToken>(type, name, attributes)
    436436    {
Note: See TracChangeset for help on using the changeset viewer.