Changeset 259378 in webkit


Ignore:
Timestamp:
Apr 1, 2020 10:22:48 PM (4 years ago)
Author:
rniwa@webkit.org
Message:

Crash in WebCore::HTMLDocumentParser::insert
https://bugs.webkit.org/show_bug.cgi?id=209892

Reviewed by Darin Adler.

Speculative fix to check that the parser hasn't been detached before running preload scanner.

No new tests since there is no reproduction and I couldn't come up with one.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::pumpTokenizer):
(WebCore::HTMLDocumentParser::insert):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r259376 r259378  
     12020-04-01  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in WebCore::HTMLDocumentParser::insert
     4        https://bugs.webkit.org/show_bug.cgi?id=209892
     5
     6        Reviewed by Darin Adler.
     7
     8        Speculative fix to check that the parser hasn't been detached before running preload scanner.
     9
     10        No new tests since there is no reproduction and I couldn't come up with one.
     11
     12        * html/parser/HTMLDocumentParser.cpp:
     13        (WebCore::HTMLDocumentParser::pumpTokenizer):
     14        (WebCore::HTMLDocumentParser::insert):
     15
    1162020-04-01  Jack Lee  <shihchieh_lee@apple.com>
    217
  • trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp

    r257763 r259378  
    334334        m_parserScheduler->scheduleForResume();
    335335
    336     if (isWaitingForScripts()) {
     336    if (isWaitingForScripts() && !isDetached()) {
    337337        ASSERT(m_tokenizer.isInDataState());
    338338        if (!m_preloadScanner) {
     
    392392    pumpTokenizerIfPossible(ForceSynchronous);
    393393
    394     if (isWaitingForScripts()) {
     394    if (isWaitingForScripts() && !isDetached()) {
    395395        // Check the document.write() output with a separate preload scanner as
    396396        // the main scanner can't deal with insertions.
Note: See TracChangeset for help on using the changeset viewer.