Changeset 179895 in webkit


Ignore:
Timestamp:
Feb 10, 2015 3:59:09 PM (9 years ago)
Author:
Chris Dumez
Message:

Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
https://bugs.webkit.org/show_bug.cgi?id=141447
<rdar://problem/13811738>

Reviewed by Alexey Proskuryakov.

Add another assertion to help track down crash in
DocumentLoader::stopLoadingForPolicyChange().

The trace seems to hint that frameLoader() returns null when
stopLoadingForPolicyChange() is called. frameLoader() can only return
null after DocumentLoader::detachFromFrame() has been called.
Also, stopLoadingForPolicyChange() here is called from the
DocumentLoader::continueAfterContentPolicy() policy callback which
requires m_waitingForContentPolicy to be true. Therefore, we should
assert that m_waitingForContentPolicy is false when m_frame is cleared
in DocumentLoader::detachFromFrame().

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::detachFromFrame):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r179886 r179895  
     12015-02-10  Chris Dumez  <cdumez@apple.com>
     2
     3        Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
     4        https://bugs.webkit.org/show_bug.cgi?id=141447
     5        <rdar://problem/13811738>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        Add another assertion to help track down crash in
     10        DocumentLoader::stopLoadingForPolicyChange().
     11
     12        The trace seems to hint that frameLoader() returns null when
     13        stopLoadingForPolicyChange() is called. frameLoader() can only return
     14        null after DocumentLoader::detachFromFrame() has been called.
     15        Also, stopLoadingForPolicyChange() here is called from the
     16        DocumentLoader::continueAfterContentPolicy() policy callback which
     17        requires m_waitingForContentPolicy to be true. Therefore, we should
     18        assert that m_waitingForContentPolicy is false when m_frame is cleared
     19        in DocumentLoader::detachFromFrame().
     20
     21        * loader/DocumentLoader.cpp:
     22        (WebCore::DocumentLoader::detachFromFrame):
     23
    1242015-02-10  Alex Christensen  <achristensen@webkit.org>
    225
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r179880 r179895  
    949949        m_mainResource->removeClient(this);
    950950
    951     m_applicationCacheHost->setDOMApplicationCache(0);
     951    m_applicationCacheHost->setDOMApplicationCache(nullptr);
    952952    InspectorInstrumentation::loaderDetachedFromFrame(*m_frame, *this);
    953     m_frame = 0;
     953    m_frame = nullptr;
     954    // The call to stopLoading() above should have canceled any pending content policy check.
     955    ASSERT_WITH_MESSAGE(!m_waitingForContentPolicy, "The content policy callback needs a valid frame.");
    954956}
    955957
Note: See TracChangeset for help on using the changeset viewer.