Title: [265464] branches/safari-610.1.25.10-branch/Source/WebKit
Revision
265464
Author
[email protected]
Date
2020-08-10 16:47:40 -0700 (Mon, 10 Aug 2020)

Log Message

Cherry-pick r265230. rdar://problem/66643993

    Null check parentProcessConnection when creating a NetworkDataTaskCocoa
    https://bugs.webkit.org/show_bug.cgi?id=215109
    <rdar://problem/64853922>

    Patch by Alex Christensen <[email protected]> on 2020-08-03
    Reviewed by Chris Dumez.

    * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
    (WebKit::NetworkSessionCocoa::sessionWrapperForTask):
    Null check parentProcessConnection.  Otherwise, we can dereference null and crash between disconnecting with the parent process and terminating,
    which isn't the worst time to crash because we are trying to terminate anyways.  But we may as well not crash.

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

Modified Paths

Diff

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/ChangeLog (265463 => 265464)


--- branches/safari-610.1.25.10-branch/Source/WebKit/ChangeLog	2020-08-10 23:47:38 UTC (rev 265463)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/ChangeLog	2020-08-10 23:47:40 UTC (rev 265464)
@@ -1,5 +1,36 @@
 2020-08-10  Alan Coon  <[email protected]>
 
+        Cherry-pick r265230. rdar://problem/66643993
+
+    Null check parentProcessConnection when creating a NetworkDataTaskCocoa
+    https://bugs.webkit.org/show_bug.cgi?id=215109
+    <rdar://problem/64853922>
+    
+    Patch by Alex Christensen <[email protected]> on 2020-08-03
+    Reviewed by Chris Dumez.
+    
+    * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+    (WebKit::NetworkSessionCocoa::sessionWrapperForTask):
+    Null check parentProcessConnection.  Otherwise, we can dereference null and crash between disconnecting with the parent process and terminating,
+    which isn't the worst time to crash because we are trying to terminate anyways.  But we may as well not crash.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-08-03  Alex Christensen  <[email protected]>
+
+            Null check parentProcessConnection when creating a NetworkDataTaskCocoa
+            https://bugs.webkit.org/show_bug.cgi?id=215109
+            <rdar://problem/64853922>
+
+            Reviewed by Chris Dumez.
+
+            * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+            (WebKit::NetworkSessionCocoa::sessionWrapperForTask):
+            Null check parentProcessConnection.  Otherwise, we can dereference null and crash between disconnecting with the parent process and terminating,
+            which isn't the worst time to crash because we are trying to terminate anyways.  But we may as well not crash.
+
+2020-08-10  Alan Coon  <[email protected]>
+
         Cherry-pick r265215. rdar://problem/66643571
 
     Finalize the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (265463 => 265464)


--- branches/safari-610.1.25.10-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2020-08-10 23:47:38 UTC (rev 265463)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2020-08-10 23:47:40 UTC (rev 265464)
@@ -1315,8 +1315,10 @@
 SessionWrapper& NetworkSessionCocoa::sessionWrapperForTask(const WebCore::ResourceRequest& request, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain)
 {
     auto shouldBeConsideredAppBound = isNavigatingToAppBoundDomain ? *isNavigatingToAppBoundDomain : NavigatingToAppBoundDomain::Yes;
-    if (isParentProcessAFullWebBrowser(networkProcess().parentProcessConnection()->getAuditToken()))
-        shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No;
+    if (auto* connection = networkProcess().parentProcessConnection()) {
+        if (isParentProcessAFullWebBrowser(connection->getAuditToken()))
+            shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No;
+    }
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
     if (auto* storageSession = networkStorageSession()) {
         auto firstParty = WebCore::RegistrableDomain(request.firstPartyForCookies());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to