Changeset 139954 in webkit


Ignore:
Timestamp:
Jan 16, 2013 7:42:09 PM (11 years ago)
Author:
abarth@webkit.org
Message:

Address tonyg's feedback on BackgroundHTMLParser
https://bugs.webkit.org/show_bug.cgi?id=107086

Reviewed by Tony Gentilcore.

As requested in https://bugs.webkit.org/show_bug.cgi?id=107083#c5

  • html/parser/BackgroundHTMLParser.cpp:

(WebCore::BackgroundHTMLParser::pumpTokenizer):
(TokenDelivery):
(WebCore::TokenDelivery::TokenDelivery):
(WebCore::TokenDelivery::execute):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r139953 r139954  
     12013-01-16  Adam Barth  <abarth@webkit.org>
     2
     3        Address tonyg's feedback on BackgroundHTMLParser
     4        https://bugs.webkit.org/show_bug.cgi?id=107086
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        As requested in https://bugs.webkit.org/show_bug.cgi?id=107083#c5
     9
     10        * html/parser/BackgroundHTMLParser.cpp:
     11        (WebCore::BackgroundHTMLParser::pumpTokenizer):
     12        (TokenDelivery):
     13        (WebCore::TokenDelivery::TokenDelivery):
     14        (WebCore::TokenDelivery::execute):
     15
    1162013-01-16  Tony Gentilcore  <tonyg@chromium.org>
    217
  • trunk/Source/WebCore/html/parser/BackgroundHTMLParser.cpp

    r139950 r139954  
    104104        return;
    105105
     106    // It's unclear whether we want to use AtomicStrings on the background
     107    // thread. We will likely eventually use libdispatch to schedule parsing
     108    // in a separate sequenced queue for each HTMLDocumentParser instance.
     109    // Once we do that, the code below will be unsafe because libdispatch
     110    // might schedule us on many different threads.
    106111    DEFINE_STATIC_LOCAL(AtomicString, iframeTag, ("iframe", AtomicString::ConstructFromLiteral));
    107112    DEFINE_STATIC_LOCAL(AtomicString, mathTag, ("math", AtomicString::ConstructFromLiteral));
     
    163168
    164169class TokenDelivery {
     170    WTF_MAKE_NONCOPYABLE(TokenDelivery);
    165171public:
     172    TokenDelivery() { }
     173
    166174    ParserIdentifier identifier;
    167175    Vector<CompactHTMLToken> tokens;
     
    173181        if (parser)
    174182            parser->didReceiveTokensFromBackgroundParser(delivery->tokens);
     183        // FIXME: Ideally we wouldn't need to call delete manually. Instead
     184        // we would like an API where the message queue owns the tasks and
     185        // takes care of deleting them.
    175186        delete delivery;
    176187    }
Note: See TracChangeset for help on using the changeset viewer.