Changeset 246703 in webkit


Ignore:
Timestamp:
Jun 21, 2019 5:11:00 PM (5 years ago)
Author:
youenn@apple.com
Message:

ResourceLoadNotifier should check whether its frame document loader is null
https://bugs.webkit.org/show_bug.cgi?id=199118

Reviewed by Geoffrey Garen.

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246701 r246703  
     12019-06-21  Youenn Fablet  <youenn@apple.com>
     2
     3        ResourceLoadNotifier should check whether its frame document loader is null
     4        https://bugs.webkit.org/show_bug.cgi?id=199118
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * loader/ResourceLoadNotifier.cpp:
     9        (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
     10
    1112019-06-21  Jiewen Tan  <jiewen_tan@apple.com>
    212
  • trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp

    r224684 r246703  
    123123
    124124    String oldRequestURL = request.url().string();
    125     m_frame.loader().documentLoader()->didTellClientAboutLoad(request.url());
     125
     126    ASSERT(m_frame.loader().documentLoader());
     127    if (m_frame.loader().documentLoader())
     128        m_frame.loader().documentLoader()->didTellClientAboutLoad(request.url());
    126129
    127130    // Notifying the FrameLoaderClient may cause the frame to be destroyed.
     
    130133
    131134    // If the URL changed, then we want to put that new URL in the "did tell client" set too.
    132     if (!request.isNull() && oldRequestURL != request.url().string())
     135    if (!request.isNull() && oldRequestURL != request.url().string() && m_frame.loader().documentLoader())
    133136        m_frame.loader().documentLoader()->didTellClientAboutLoad(request.url());
    134137
Note: See TracChangeset for help on using the changeset viewer.