Changeset 209791 in webkit


Ignore:
Timestamp:
Dec 13, 2016 10:22:13 PM (7 years ago)
Author:
Yusuke Suzuki
Message:

ASSERTION FAILED: hasParserBlockingScript() seen with js/dom/modules/module-will-fire-beforeload.html
https://bugs.webkit.org/show_bug.cgi?id=164883

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is *attempt to fix* patch since I cannot reproduce the crash reported in this issue.
One possible scenario of this crash is the following.

  1. There is pending deferred scripts, that is not fetched yet.
  2. Then, we start watching on the script. And stop document parser.
  3. The document parser is stopped/detached by calling finishJSTest in beforeload.
  4. At this critical timing, (2)'s script is fetched, and notifyFinished is called since it is watched.

In this patch, we ignore the script execution if the document parser is stopped / detached.
Previously, it goes into the wrong path. And it causes assertion failure.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::notifyFinished):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r209789 r209791  
     12016-12-13  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        ASSERTION FAILED: hasParserBlockingScript() seen with js/dom/modules/module-will-fire-beforeload.html
     4        https://bugs.webkit.org/show_bug.cgi?id=164883
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * platform/mac-wk2/TestExpectations:
     9
    1102016-12-13  Daniel Bates  <dabates@apple.com>
    211
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r209760 r209791  
    605605webkit.org/b/164870 [ Debug ] imported/w3c/web-platform-tests/IndexedDB/idbcursor_iterating.htm [ Pass Failure ]
    606606
    607 webkit.org/b/164884 [ Debug ] js/dom/modules/module-will-fire-beforeload.html [ Skip ]
    608 
    609607webkit.org/b/165352 fast/dom/Window/window-resize-contents.html [ Pass Timeout ]
    610608
  • trunk/Source/WebCore/ChangeLog

    r209790 r209791  
     12016-12-13  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        ASSERTION FAILED: hasParserBlockingScript() seen with js/dom/modules/module-will-fire-beforeload.html
     4        https://bugs.webkit.org/show_bug.cgi?id=164883
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        This is *attempt to fix* patch since I cannot reproduce the crash reported in this issue.
     9        One possible scenario of this crash is the following.
     10
     11        1. There is pending deferred scripts, that is not fetched yet.
     12        2. Then, we start watching on the script. And stop document parser.
     13        3. The document parser is stopped/detached by calling finishJSTest in beforeload.
     14        4. At this critical timing, (2)'s script is fetched, and notifyFinished is called since it is watched.
     15
     16        In this patch, we ignore the script execution if the document parser is stopped / detached.
     17        Previously, it goes into the wrong path. And it causes assertion failure.
     18
     19        * html/parser/HTMLDocumentParser.cpp:
     20        (WebCore::HTMLDocumentParser::notifyFinished):
     21
    1222016-12-13  Keith Rollin  <krollin@apple.com>
    223
  • trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp

    r209129 r209791  
    522522    Ref<HTMLDocumentParser> protectedThis(*this);
    523523
     524    // After Document parser is stopped or detached, the parser-inserted deferred script execution should be ignored.
     525    if (isStopped())
     526        return;
     527
    524528    ASSERT(m_scriptRunner);
    525529    ASSERT(!isExecutingScript());
Note: See TracChangeset for help on using the changeset viewer.