Title: [271040] trunk/Source/WebKit
- Revision
- 271040
- Author
- [email protected]
- Date
- 2020-12-21 13:59:00 -0800 (Mon, 21 Dec 2020)
Log Message
Retain IPC::Connection when using it when making a NetworkDataTask
https://bugs.webkit.org/show_bug.cgi?id=220067
Patch by Alex Christensen <[email protected]> on 2020-12-21
Reviewed by Geoffrey Garen.
r265230 helped, but it's still crashing.
Maybe we're getting a non-null pointer to an object that is about to be destroyed on another thread.
There's no reason not to keep it alive here.
Also, don't release assert in isParentProcessAFullWebBrowser if there's no audit token so we don't
just kick this can down the road.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::sessionWrapperForTask):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (271039 => 271040)
--- trunk/Source/WebKit/ChangeLog 2020-12-21 21:31:23 UTC (rev 271039)
+++ trunk/Source/WebKit/ChangeLog 2020-12-21 21:59:00 UTC (rev 271040)
@@ -1,3 +1,19 @@
+2020-12-21 Alex Christensen <[email protected]>
+
+ Retain IPC::Connection when using it when making a NetworkDataTask
+ https://bugs.webkit.org/show_bug.cgi?id=220067
+
+ Reviewed by Geoffrey Garen.
+
+ r265230 helped, but it's still crashing.
+ Maybe we're getting a non-null pointer to an object that is about to be destroyed on another thread.
+ There's no reason not to keep it alive here.
+ Also, don't release assert in isParentProcessAFullWebBrowser if there's no audit token so we don't
+ just kick this can down the road.
+
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSessionCocoa::sessionWrapperForTask):
+
2020-12-21 Ryan Haddad <[email protected]>
Unreviewed, reverting r270939 and r270952.
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (271039 => 271040)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-12-21 21:31:23 UTC (rev 271039)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2020-12-21 21:59:00 UTC (rev 271040)
@@ -1355,7 +1355,7 @@
SessionWrapper& NetworkSessionCocoa::sessionWrapperForTask(const WebCore::ResourceRequest& request, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, Optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain)
{
auto shouldBeConsideredAppBound = isNavigatingToAppBoundDomain ? *isNavigatingToAppBoundDomain : NavigatingToAppBoundDomain::Yes;
- if (auto* connection = networkProcess().parentProcessConnection()) {
+ if (RefPtr<IPC::Connection> connection = networkProcess().parentProcessConnection()) {
if (isParentProcessAFullWebBrowser(connection->getAuditToken()))
shouldBeConsideredAppBound = NavigatingToAppBoundDomain::No;
}
Modified: trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm (271039 => 271040)
--- trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm 2020-12-21 21:31:23 UTC (rev 271039)
+++ trunk/Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm 2020-12-21 21:59:00 UTC (rev 271040)
@@ -213,7 +213,8 @@
bool isParentProcessAFullWebBrowser(Optional<audit_token_t> auditToken)
{
ASSERT(isInWebKitChildProcess());
- RELEASE_ASSERT(auditToken);
+ if (!auditToken)
+ return false;
static bool fullWebBrowser;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes