Title: [247303] branches/safari-608.1.34.1-branch/Source/WebCore
Revision
247303
Author
[email protected]
Date
2019-07-10 09:09:31 -0700 (Wed, 10 Jul 2019)

Log Message

Cherry-pick r247231. rdar://problem/52640967

    Prevent null dereferencing in SubresourceLoader::init's lambda
    https://bugs.webkit.org/show_bug.cgi?id=199580

    Reviewed by Ryosuke Niwa.

    Crash logs indicate that sometimes m_documentLoader is null.
    This is similar to https://bugs.webkit.org/show_bug.cgi?id=187360

    * loader/SubresourceLoader.cpp:
    (WebCore::SubresourceLoader::init):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247231 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608.1.34.1-branch/Source/WebCore/ChangeLog (247302 => 247303)


--- branches/safari-608.1.34.1-branch/Source/WebCore/ChangeLog	2019-07-10 16:06:53 UTC (rev 247302)
+++ branches/safari-608.1.34.1-branch/Source/WebCore/ChangeLog	2019-07-10 16:09:31 UTC (rev 247303)
@@ -1,3 +1,35 @@
+2019-07-10  Alan Coon  <[email protected]>
+
+        Cherry-pick r247231. rdar://problem/52640967
+
+    Prevent null dereferencing in SubresourceLoader::init's lambda
+    https://bugs.webkit.org/show_bug.cgi?id=199580
+    
+    Reviewed by Ryosuke Niwa.
+    
+    Crash logs indicate that sometimes m_documentLoader is null.
+    This is similar to https://bugs.webkit.org/show_bug.cgi?id=187360
+    
+    * loader/SubresourceLoader.cpp:
+    (WebCore::SubresourceLoader::init):
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-08  Alex Christensen  <[email protected]>
+
+            Prevent null dereferencing in SubresourceLoader::init's lambda
+            https://bugs.webkit.org/show_bug.cgi?id=199580
+
+            Reviewed by Ryosuke Niwa.
+
+            Crash logs indicate that sometimes m_documentLoader is null.
+            This is similar to https://bugs.webkit.org/show_bug.cgi?id=187360
+
+            * loader/SubresourceLoader.cpp:
+            (WebCore::SubresourceLoader::init):
+
 2019-07-05  Babak Shafiei  <[email protected]>
 
         Revert r247115. rdar://problem/51288898

Modified: branches/safari-608.1.34.1-branch/Source/WebCore/loader/SubresourceLoader.cpp (247302 => 247303)


--- branches/safari-608.1.34.1-branch/Source/WebCore/loader/SubresourceLoader.cpp	2019-07-10 16:06:53 UTC (rev 247302)
+++ branches/safari-608.1.34.1-branch/Source/WebCore/loader/SubresourceLoader.cpp	2019-07-10 16:09:31 UTC (rev 247303)
@@ -164,6 +164,11 @@
     ResourceLoader::init(WTFMove(request), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (bool initialized) mutable {
         if (!initialized)
             return completionHandler(false);
+        if (!m_documentLoader) {
+            ASSERT_NOT_REACHED();
+            RELEASE_LOG_ERROR(ResourceLoading, "SubresourceLoader::init: resource load canceled because document loader is null (frame = %p, frameLoader = %p, resourceID = %lu)", frame(), frameLoader(), identifier());
+            return completionHandler(false);
+        }
         ASSERT(!reachedTerminalState());
         m_state = Initialized;
         m_documentLoader->addSubresourceLoader(this);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to