Changeset 139959 in webkit


Ignore:
Timestamp:
Jan 16, 2013 8:35:43 PM (11 years ago)
Author:
tonyg@chromium.org
Message:

Disable an ASSERT for the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=107087

Reviewed by Adam Barth.

Since tokenizing happens on the background thread, when the tree builder runs there isn't a valid tokenizer for which to check the state.
The background parser has minimal code to update its tokenizer's state properly.

No new tests because covered by existing fast/parser tests.

  • html/parser/HTMLParserOptions.cpp:

(WebCore::HTMLParserOptions::HTMLParserOptions):

  • html/parser/HTMLParserOptions.h:

(HTMLParserOptions):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processEndTag):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r139958 r139959  
     12013-01-16  Tony Gentilcore  <tonyg@chromium.org>
     2
     3        Disable an ASSERT for the threaded parser
     4        https://bugs.webkit.org/show_bug.cgi?id=107087
     5
     6        Reviewed by Adam Barth.
     7
     8        Since tokenizing happens on the background thread, when the tree builder runs there isn't a valid tokenizer for which to check the state.
     9        The background parser has minimal code to update its tokenizer's state properly.
     10
     11        No new tests because covered by existing fast/parser tests.
     12
     13        * html/parser/HTMLParserOptions.cpp:
     14        (WebCore::HTMLParserOptions::HTMLParserOptions):
     15        * html/parser/HTMLParserOptions.h:
     16        (HTMLParserOptions):
     17        * html/parser/HTMLTreeBuilder.cpp:
     18        (WebCore::HTMLTreeBuilder::processEndTag):
     19
    1202013-01-16  MORITA Hajime  <morrita@google.com>
    221
  • trunk/Source/WebCore/html/parser/HTMLParserOptions.cpp

    r139938 r139959  
    4343#if ENABLE(THREADED_HTML_PARSER)
    4444    useThreading = settings && settings->threadedHTMLParser();
     45#else
     46    useThreading = false;
    4547#endif
    4648    maximumDOMTreeDepth = settings ? settings->maximumHTMLParserDOMTreeDepth() : Settings::defaultMaximumHTMLParserDOMTreeDepth;
  • trunk/Source/WebCore/html/parser/HTMLParserOptions.h

    r139938 r139959  
    3636    bool pluginsEnabled;
    3737    bool usePreHTML5ParserQuirks;
    38 #if ENABLE(THREADED_HTML_PARSER)
    3938    bool useThreading;
    40 #endif
    4139    unsigned maximumDOMTreeDepth;
    4240
  • trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp

    r139760 r139959  
    21582158            // quirks are enabled. We must set the tokenizer's state to
    21592159            // DataState explicitly if the tokenizer didn't have a chance to.
    2160             ASSERT(m_parser->tokenizer()->state() == HTMLTokenizerState::DataState || m_options.usePreHTML5ParserQuirks);
     2160            ASSERT(m_parser->tokenizer()->state() == HTMLTokenizerState::DataState || m_options.usePreHTML5ParserQuirks || m_options.useThreading);
    21612161            m_parser->tokenizer()->setState(HTMLTokenizerState::DataState);
    21622162            return;
Note: See TracChangeset for help on using the changeset viewer.