⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243738 in webkit


Ignore:
Timestamp:
Apr 1, 2019, 11:44:45 PM (7 years ago)
Author:
rniwa@webkit.org
Message:

Nullptr crash in Document::open after calling policyChecker().stopCheck()
https://bugs.webkit.org/show_bug.cgi?id=196479

Reviewed by Antti Koivisto.

Added a missing nullptr check in Document::open after calling m_frame->loader().policyChecker().stopCheck()
since it invokes m_willSubmitFormCompletionHandlers in WebKit2, and that could clear m_frame.

Unfortunately, we don't have any reproducible test case.

  • dom/Document.cpp:

(WebCore::Document::open):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r243736 r243738  
     12019-04-01  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Nullptr crash in Document::open after calling policyChecker().stopCheck()
     4        https://bugs.webkit.org/show_bug.cgi?id=196479
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Added a missing nullptr check in Document::open after calling m_frame->loader().policyChecker().stopCheck()
     9        since it invokes m_willSubmitFormCompletionHandlers in WebKit2, and that could clear m_frame.
     10
     11        Unfortunately, we don't have any reproducible test case.
     12
     13        * dom/Document.cpp:
     14        (WebCore::Document::open):
     15
    1162019-04-01  Timothy Hatcher  <timothy@apple.com>
    217
  • trunk/Source/WebCore/dom/Document.cpp

    r243734 r243738  
    27392739        if (m_frame->loader().policyChecker().delegateIsDecidingNavigationPolicy())
    27402740            m_frame->loader().policyChecker().stopCheck();
    2741         if (m_frame->loader().state() == FrameStateProvisional)
     2741        if (m_frame && m_frame->loader().state() == FrameStateProvisional)
    27422742            m_frame->loader().stopAllLoaders();
    27432743    }
Note: See TracChangeset for help on using the changeset viewer.