Changeset 140635 in webkit


Ignore:
Timestamp:
Jan 23, 2013 7:24:32 PM (11 years ago)
Author:
abarth@webkit.org
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140633 r140635  
     12013-01-23  Adam Barth  <abarth@webkit.org>
     2
     3        BackgroundHTMLParser should use more const references to avoid copy constructors
     4        https://bugs.webkit.org/show_bug.cgi?id=107763
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        I doubt this optimization is visible anywhere, but it's just a nit.
     9
     10        * html/parser/BackgroundHTMLParser.cpp:
     11        (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
     12        (WebCore::BackgroundHTMLParser::createPartial):
     13        * html/parser/BackgroundHTMLParser.h:
     14        (WebCore::BackgroundHTMLParser::create):
     15        (BackgroundHTMLParser):
     16
    1172013-01-23  Abhishek Arya  <inferno@chromium.org>
    218
  • trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp

    r140589 r140635  
    8383}
    8484
    85 BackgroundHTMLParser::BackgroundHTMLParser(const HTMLParserOptions& options, WeakPtr<HTMLDocumentParser> parser)
     85BackgroundHTMLParser::BackgroundHTMLParser(const HTMLParserOptions& options, const WeakPtr<HTMLDocumentParser>& parser)
    8686    : m_inForeignContent(false)
    8787    , m_tokenizer(HTMLTokenizer::create(options))
     
    179179}
    180180
    181 void BackgroundHTMLParser::createPartial(ParserIdentifier identifier, HTMLParserOptions options, WeakPtr<HTMLDocumentParser> parser)
     181void BackgroundHTMLParser::createPartial(ParserIdentifier identifier, const HTMLParserOptions& options, const WeakPtr<HTMLDocumentParser>& parser)
    182182{
    183183    ASSERT(!parserMap().backgroundParsers().get(identifier));
  • trunk/Source/WebCore/html/parser/BackgroundHTMLParser.h

    r140589 r140635  
    4646    void finish();
    4747
    48     static PassOwnPtr<BackgroundHTMLParser> create(const HTMLParserOptions& options, WeakPtr<HTMLDocumentParser> parser)
     48    static PassOwnPtr<BackgroundHTMLParser> create(const HTMLParserOptions& options, const WeakPtr<HTMLDocumentParser>& parser)
    4949    {
    5050        return adoptPtr(new BackgroundHTMLParser(options, parser));
    5151    }
    5252
    53     static void createPartial(ParserIdentifier, HTMLParserOptions, WeakPtr<HTMLDocumentParser>);
     53    static void createPartial(ParserIdentifier, const HTMLParserOptions&, const WeakPtr<HTMLDocumentParser>&);
    5454    static void stopPartial(ParserIdentifier);
    5555    static void appendPartial(ParserIdentifier, const String& input);
     
    5757
    5858private:
    59     BackgroundHTMLParser(const HTMLParserOptions&, WeakPtr<HTMLDocumentParser>);
     59    BackgroundHTMLParser(const HTMLParserOptions&, const WeakPtr<HTMLDocumentParser>&);
    6060
    6161    void markEndOfFile();
Note: See TracChangeset for help on using the changeset viewer.