Title: [281175] trunk/Source/WebKit
- Revision
- 281175
- Author
- [email protected]
- Date
- 2021-08-17 17:55:59 -0700 (Tue, 17 Aug 2021)
Log Message
Fix crash in TestWebKitAPI.NetworkProcess.CrashWhenNotAssociatedWithDataStore
https://bugs.webkit.org/show_bug.cgi?id=229209
rdar://82040197
Reviewed by Geoffrey Garen.
When getting network process connection fails, we don't need to retry or crash UI process if web process is
already gone.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::getNetworkProcessConnection):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (281174 => 281175)
--- trunk/Source/WebKit/ChangeLog 2021-08-18 00:12:19 UTC (rev 281174)
+++ trunk/Source/WebKit/ChangeLog 2021-08-18 00:55:59 UTC (rev 281175)
@@ -1,3 +1,17 @@
+2021-08-17 Sihui Liu <[email protected]>
+
+ Fix crash in TestWebKitAPI.NetworkProcess.CrashWhenNotAssociatedWithDataStore
+ https://bugs.webkit.org/show_bug.cgi?id=229209
+ rdar://82040197
+
+ Reviewed by Geoffrey Garen.
+
+ When getting network process connection fails, we don't need to retry or crash UI process if web process is
+ already gone.
+
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::getNetworkProcessConnection):
+
2021-08-17 Fujii Hironori <[email protected]>
[curl] Kept alive NetworkResourceLoaders should be cancelled by NetworkLoad::didCompleteWithError on PolicyAction::Ignore of didReceiveResponse
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (281174 => 281175)
--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2021-08-18 00:12:19 UTC (rev 281174)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2021-08-18 00:55:59 UTC (rev 281175)
@@ -1736,6 +1736,9 @@
if (!os_variant_allows_internal_security_policies("com.apple.WebKit"))
return;
+ if (!webProcessProxy)
+ return;
+
int networkProcessIdentifier = 0;
String networkProcessState = "Unknown"_s;
if (networkProcessProxy) {
@@ -1742,11 +1745,11 @@
networkProcessIdentifier = networkProcessProxy->processIdentifier();
networkProcessState = networkProcessProxy->stateString();
}
- RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE("WebsiteDataStore::getNetworkProcessConnection: Failed to get connection - networkProcessProxy=%p, networkProcessIdentifier=%d, processState=%s, webProcessProxy=%p, webProcessIdentifier=%d", networkProcessProxy.get(), networkProcessIdentifier, networkProcessState.utf8().data(), webProcessProxy.get(), webProcessProxy ? webProcessProxy->processIdentifier() : 0);
+ RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE("WebsiteDataStore::getNetworkProcessConnection: Failed to get connection - networkProcessProxy=%p, networkProcessIdentifier=%d, processState=%s, webProcessProxy=%p, webProcessIdentifier=%d", networkProcessProxy.get(), networkProcessIdentifier, networkProcessState.utf8().data(), webProcessProxy.get(), webProcessProxy->processIdentifier());
#endif
};
- if (shouldRetryOnFailure == ShouldRetryOnFailure::No) {
+ if (shouldRetryOnFailure == ShouldRetryOnFailure::No || !webProcessProxy) {
logError();
reply({ });
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes