Title: [140635] trunk/Source/WebCore
Revision
140635
Author
[email protected]
Date
2013-01-23 19:24:32 -0800 (Wed, 23 Jan 2013)

Log Message

BackgroundHTMLParser should use more const references to avoid copy constructors
https://bugs.webkit.org/show_bug.cgi?id=107763

Reviewed by Tony Gentilcore.

I doubt this optimization is visible anywhere, but it's just a nit.

* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::createPartial):
* html/parser/BackgroundHTMLParser.h:
(WebCore::BackgroundHTMLParser::create):
(BackgroundHTMLParser):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140634 => 140635)


--- trunk/Source/WebCore/ChangeLog	2013-01-24 02:57:46 UTC (rev 140634)
+++ trunk/Source/WebCore/ChangeLog	2013-01-24 03:24:32 UTC (rev 140635)
@@ -1,3 +1,19 @@
+2013-01-23  Adam Barth  <[email protected]>
+
+        BackgroundHTMLParser should use more const references to avoid copy constructors
+        https://bugs.webkit.org/show_bug.cgi?id=107763
+
+        Reviewed by Tony Gentilcore.
+
+        I doubt this optimization is visible anywhere, but it's just a nit.
+
+        * html/parser/BackgroundHTMLParser.cpp:
+        (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
+        (WebCore::BackgroundHTMLParser::createPartial):
+        * html/parser/BackgroundHTMLParser.h:
+        (WebCore::BackgroundHTMLParser::create):
+        (BackgroundHTMLParser):
+
 2013-01-23  Abhishek Arya  <[email protected]>
 
         Add support for ASSERT_WITH_SECURITY_IMPLICATION.

Modified: trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp (140634 => 140635)


--- trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp	2013-01-24 02:57:46 UTC (rev 140634)
+++ trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp	2013-01-24 03:24:32 UTC (rev 140635)
@@ -82,7 +82,7 @@
     return m_backgroundParsers;
 }
 
-BackgroundHTMLParser::BackgroundHTMLParser(const HTMLParserOptions& options, WeakPtr<HTMLDocumentParser> parser)
+BackgroundHTMLParser::BackgroundHTMLParser(const HTMLParserOptions& options, const WeakPtr<HTMLDocumentParser>& parser)
     : m_inForeignContent(false)
     , m_tokenizer(HTMLTokenizer::create(options))
     , m_options(options)
@@ -178,7 +178,7 @@
     m_pendingTokens = adoptPtr(new CompactHTMLTokenStream);
 }
 
-void BackgroundHTMLParser::createPartial(ParserIdentifier identifier, HTMLParserOptions options, WeakPtr<HTMLDocumentParser> parser)
+void BackgroundHTMLParser::createPartial(ParserIdentifier identifier, const HTMLParserOptions& options, const WeakPtr<HTMLDocumentParser>& parser)
 {
     ASSERT(!parserMap().backgroundParsers().get(identifier));
     parserMap().backgroundParsers().set(identifier, BackgroundHTMLParser::create(options, parser));

Modified: trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h (140634 => 140635)


--- trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h	2013-01-24 02:57:46 UTC (rev 140634)
+++ trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h	2013-01-24 03:24:32 UTC (rev 140635)
@@ -45,18 +45,18 @@
     void append(const String&);
     void finish();
 
-    static PassOwnPtr<BackgroundHTMLParser> create(const HTMLParserOptions& options, WeakPtr<HTMLDocumentParser> parser)
+    static PassOwnPtr<BackgroundHTMLParser> create(const HTMLParserOptions& options, const WeakPtr<HTMLDocumentParser>& parser)
     {
         return adoptPtr(new BackgroundHTMLParser(options, parser));
     }
 
-    static void createPartial(ParserIdentifier, HTMLParserOptions, WeakPtr<HTMLDocumentParser>);
+    static void createPartial(ParserIdentifier, const HTMLParserOptions&, const WeakPtr<HTMLDocumentParser>&);
     static void stopPartial(ParserIdentifier);
     static void appendPartial(ParserIdentifier, const String& input);
     static void finishPartial(ParserIdentifier);
 
 private:
-    BackgroundHTMLParser(const HTMLParserOptions&, WeakPtr<HTMLDocumentParser>);
+    BackgroundHTMLParser(const HTMLParserOptions&, const WeakPtr<HTMLDocumentParser>&);
 
     void markEndOfFile();
     void pumpTokenizer();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to