Changeset 247399 in webkit


Ignore:
Timestamp:
Jul 12, 2019 2:50:31 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Change RELEASE_ASSERT in DocumentWriter::addData to ASSERT and early return
https://bugs.webkit.org/show_bug.cgi?id=199756
<rdar://problem/51554775>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-12
Reviewed by Brady Eidson.

Attempts to reach this assertion were unsuccessful, but sometimes this assertion crashes.
Let's change it to an early return to prevent crashes.

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::addData):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r247398 r247399  
     12019-07-12  Alex Christensen  <achristensen@webkit.org>
     2
     3        Change RELEASE_ASSERT in DocumentWriter::addData to ASSERT and early return
     4        https://bugs.webkit.org/show_bug.cgi?id=199756
     5        <rdar://problem/51554775>
     6
     7        Reviewed by Brady Eidson.
     8
     9        Attempts to reach this assertion were unsuccessful, but sometimes this assertion crashes.
     10        Let's change it to an early return to prevent crashes.
     11
     12        * loader/DocumentWriter.cpp:
     13        (WebCore::DocumentWriter::addData):
     14
    1152019-07-12  Justin Fan  <justin_fan@apple.com>
    216
  • trunk/Source/WebCore/loader/DocumentWriter.cpp

    r247017 r247399  
    238238    // FIXME: Change these to ASSERT once https://bugs.webkit.org/show_bug.cgi?id=80427 has been resolved.
    239239    RELEASE_ASSERT(m_state != State::NotStarted);
    240     RELEASE_ASSERT(m_state != State::Finished);
     240    if (m_state == State::Finished) {
     241        ASSERT_NOT_REACHED();
     242        return;
     243    }
    241244    ASSERT(m_parser);
    242245    m_parser->appendBytes(*this, bytes, length);
Note: See TracChangeset for help on using the changeset viewer.