Changeset 144158 in webkit


Ignore:
Timestamp:
Feb 27, 2013 1:21:56 AM (11 years ago)
Author:
abarth@webkit.org
Message:

HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser can trigger ASSERT(m_speculations.isEmpty())
https://bugs.webkit.org/show_bug.cgi?id=110949

Reviewed by Eric Seidel.

We can hit this ASSERT if didReceiveParsedChunkFromBackgroundParser is
called from the background thread while we're processing
m_speculations (i.e., if processing m_speculations is taking a while
and we've yielded to the event loop).

It's hard to write a deterministic test for this patch, but it's hit
quite often with existing LayoutTests.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r144157 r144158  
     12013-02-27  Adam Barth  <abarth@webkit.org>
     2
     3        HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser can trigger ASSERT(m_speculations.isEmpty())
     4        https://bugs.webkit.org/show_bug.cgi?id=110949
     5
     6        Reviewed by Eric Seidel.
     7
     8        We can hit this ASSERT if didReceiveParsedChunkFromBackgroundParser is
     9        called from the background thread while we're processing
     10        m_speculations (i.e., if processing m_speculations is taking a while
     11        and we've yielded to the event loop).
     12
     13        It's hard to write a deterministic test for this patch, but it's hit
     14        quite often with existing LayoutTests.
     15
     16        * html/parser/HTMLDocumentParser.cpp:
     17        (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
     18
    1192013-02-27  Kentaro Hara  <haraken@chromium.org>
    220
  • trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp

    r144027 r144158  
    309309void HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk> chunk)
    310310{
    311     if (isWaitingForScripts()) {
     311    if (isWaitingForScripts() || !m_speculations.isEmpty()) {
    312312        m_preloader->takeAndPreload(chunk->preloads);
    313313        m_speculations.append(chunk);
Note: See TracChangeset for help on using the changeset viewer.