Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(r267763) NetworkProcess never terminates
https://bugs.webkit.org/show_bug.cgi?id=224191 <rdar://problem/76124590> Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-05 Reviewed by Chris Dumez. Source/WebKit: Before r267763, when a WebProcessPool was deallocated, the NetworkProcess it owned was terminated. Since then, once you start using a NetworkProcess, it will be kept until your app closes or it crashes. To reclaim these resources in a way similar to how we did before, we now terminate the network process in two situations: 1. If all WebsiteDataStores associated with it are deallocated. This happens if you have never used the default WKWebsiteDataStore. 2. If all WebProcessPools are deallocated. This can still happen if you do use the default WKWebsiteDataStore, which is never deallocated. Covered by API tests. * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (+[WKWebsiteDataStore _defaultNetworkProcessExists]): * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::defaultNetworkProcessExists): (WebKit::NetworkProcessProxy::removeSession): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::~WebProcessPool): Tools: * TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm: (TEST): Canonical link: https://commits.webkit.org/236145@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
cb711fc
commit 2b60f31
Showing
9 changed files
with
88 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters