Title: [265230] trunk/Source/WebKit
- Revision
- 265230
- Author
- [email protected]
- Date
- 2020-08-03 16:43:29 -0700 (Mon, 03 Aug 2020)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (265229 => 265230)
--- trunk/Source/WebKit/ChangeLog 2020-08-03 22:53:06 UTC (rev 265229)
+++ trunk/Source/WebKit/ChangeLog 2020-08-03 23:43:29 UTC (rev 265230)
@@ -1,3 +1,16 @@
+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-03 Wenson Hsieh <[email protected]>
Remove the ENABLE_DATA_INTERACTION feature flag
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (265229 => 265230)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-08-03 22:53:06 UTC (rev 265229)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-08-03 23:43:29 UTC (rev 265230)
@@ -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