Title: [246703] trunk/Source/WebCore
Revision
246703
Author
[email protected]
Date
2019-06-21 17:11:00 -0700 (Fri, 21 Jun 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (246702 => 246703)


--- trunk/Source/WebCore/ChangeLog	2019-06-21 22:52:52 UTC (rev 246702)
+++ trunk/Source/WebCore/ChangeLog	2019-06-22 00:11:00 UTC (rev 246703)
@@ -1,3 +1,13 @@
+2019-06-21  Youenn Fablet  <[email protected]>
+
+        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):
+
 2019-06-21  Jiewen Tan  <[email protected]>
 
         WebPageProxy::loadData should accept ShouldOpenExternalURLsPolicy

Modified: trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp (246702 => 246703)


--- trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp	2019-06-21 22:52:52 UTC (rev 246702)
+++ trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp	2019-06-22 00:11:00 UTC (rev 246703)
@@ -122,14 +122,17 @@
 #endif
 
     String oldRequestURL = request.url().string();
-    m_frame.loader().documentLoader()->didTellClientAboutLoad(request.url());
 
+    ASSERT(m_frame.loader().documentLoader());
+    if (m_frame.loader().documentLoader())
+        m_frame.loader().documentLoader()->didTellClientAboutLoad(request.url());
+
     // Notifying the FrameLoaderClient may cause the frame to be destroyed.
     Ref<Frame> protect(m_frame);
     m_frame.loader().client().dispatchWillSendRequest(loader, identifier, request, redirectResponse);
 
     // If the URL changed, then we want to put that new URL in the "did tell client" set too.
-    if (!request.isNull() && oldRequestURL != request.url().string())
+    if (!request.isNull() && oldRequestURL != request.url().string() && m_frame.loader().documentLoader())
         m_frame.loader().documentLoader()->didTellClientAboutLoad(request.url());
 
     InspectorInstrumentation::willSendRequest(&m_frame, identifier, loader, request, redirectResponse);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to