Title: [117473] trunk/Source/WebCore
Revision
117473
Author
kl...@webkit.org
Date
2012-05-17 11:57:16 -0700 (Thu, 17 May 2012)

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (117472 => 117473)


--- trunk/Source/WebCore/ChangeLog	2012-05-17 18:50:00 UTC (rev 117472)
+++ trunk/Source/WebCore/ChangeLog	2012-05-17 18:57:16 UTC (rev 117473)
@@ -1,3 +1,20 @@
+2012-05-17  Andreas Kling  <kl...@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  <kl...@webkit.org>
 
         Make PluginInfoStore properly thread-safe.

Modified: trunk/Source/WebCore/html/parser/HTMLToken.h (117472 => 117473)


--- trunk/Source/WebCore/html/parser/HTMLToken.h	2012-05-17 18:50:00 UTC (rev 117472)
+++ trunk/Source/WebCore/html/parser/HTMLToken.h	2012-05-17 18:57:16 UTC (rev 117473)
@@ -86,7 +86,7 @@
 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)
     {
     }

Modified: trunk/Source/WebCore/xml/parser/MarkupTokenBase.h (117472 => 117473)


--- trunk/Source/WebCore/xml/parser/MarkupTokenBase.h	2012-05-17 18:50:00 UTC (rev 117472)
+++ trunk/Source/WebCore/xml/parser/MarkupTokenBase.h	2012-05-17 18:57:16 UTC (rev 117473)
@@ -409,7 +409,7 @@
         }
     }
 
-    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)

Modified: trunk/Source/WebCore/xml/parser/XMLToken.h (117472 => 117473)


--- trunk/Source/WebCore/xml/parser/XMLToken.h	2012-05-17 18:50:00 UTC (rev 117472)
+++ trunk/Source/WebCore/xml/parser/XMLToken.h	2012-05-17 18:57:16 UTC (rev 117473)
@@ -431,7 +431,7 @@
         }
     }
 
-    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)
     {
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to