Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3d0e7ad3913b69dcde692cd57f9919e2d88b478c
https://github.com/WebKit/WebKit/commit/3d0e7ad3913b69dcde692cd57f9919e2d88b478c
Author: Youenn Fablet <[email protected]>
Date: 2024-11-05 (Tue, 05 Nov 2024)
Changed paths:
M Source/WebCore/workers/service/server/SWServer.cpp
M Source/WebCore/workers/service/server/SWServerToContextConnection.h
M Source/WebCore/workers/service/server/SWServerWorker.cpp
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.cpp
M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp
M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
M
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp
M
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h
Log Message:
-----------
Make SWServerToContextConnection RefCounted
https://bugs.webkit.org/show_bug.cgi?id=282390
rdar://problem/138999597
Reviewed by Chris Dumez.
By moving to RefCounted, we align with WebSharedWorkerServerToContextConnection.
We remove some CheckedPtr and are able to take a Ref to the connection when no
longer needing it, which is safer.
In the future, we might also close it at the time we send a message to
terminate unresponsive service workers, which will be made easier with this
patch.
* Source/WebCore/workers/service/server/SWServer.cpp:
(WebCore::SWServer::tryInstallContextData):
(WebCore::SWServer::terminateContextConnectionWhenPossible):
(WebCore::SWServer::installContextData):
(WebCore::SWServer::runServiceWorkerIfNecessary):
(WebCore::SWServer::runServiceWorker):
(WebCore::SWServer::fireInstallEvent):
(WebCore::SWServer::unregisterServiceWorkerClient):
(WebCore::SWServer::removeContextConnectionIfPossible):
(WebCore::SWServer::contextConnectionForRegistrableDomain):
(WebCore::SWServer::setInspectable):
* Source/WebCore/workers/service/server/SWServer.h:
* Source/WebCore/workers/service/server/SWServerToContextConnection.h:
* Source/WebCore/workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::updateAppInitiatedValue):
(WebCore::SWServerWorker::startTermination):
(WebCore::SWServerWorker::contextConnection):
(WebCore::SWServerWorker::didSaveScriptsToDisk):
* Source/WebCore/workers/service/server/SWServerWorker.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::establishSWContextConnection):
(WebKit::NetworkConnectionToWebProcess::closeSWContextConnection):
(WebKit::NetworkConnectionToWebProcess::serviceWorkerServerToContextConnectionNoLongerNeeded):
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.cpp:
(WebKit::ServiceWorkerDownloadTask::ServiceWorkerDownloadTask):
(WebKit::ServiceWorkerDownloadTask::startListeningForIPC):
(WebKit::ServiceWorkerDownloadTask::close):
(WebKit::ServiceWorkerDownloadTask::sendToServiceWorker):
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::~ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::workerClosed):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::updateRegistrationStateInClient):
(WebKit::WebSWServerConnection::fireUpdateFoundEvent):
(WebKit::WebSWServerConnection::setRegistrationLastUpdateTime):
(WebKit::WebSWServerConnection::setRegistrationUpdateViaCache):
(WebKit::WebSWServerConnection::updateWorkerStateInClient):
(WebKit::WebSWServerConnection::registerServiceWorkerClientInternal):
(WebKit::WebSWServerConnection::unregisterServiceWorkerClient):
(WebKit::WebSWServerConnection::updateThrottleState):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::~WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::stop):
(WebKit::WebSWServerToContextConnection::protectedConnection const):
(WebKit::WebSWServerToContextConnection::networkProcess):
(WebKit::WebSWServerToContextConnection::protectedIPCConnection const):
(WebKit::WebSWServerToContextConnection::ipcConnection const):
(WebKit::WebSWServerToContextConnection::messageSenderConnection const):
(WebKit::WebSWServerToContextConnection::firePushEvent):
(WebKit::WebSWServerToContextConnection::fireNotificationEvent):
(WebKit::WebSWServerToContextConnection::fireBackgroundFetchEvent):
(WebKit::WebSWServerToContextConnection::fireBackgroundFetchClickEvent):
(WebKit::WebSWServerToContextConnection::connectionIsNoLongerNeeded):
(WebKit::WebSWServerToContextConnection::navigate):
(WebKit::WebSWServerToContextConnection::webProcessIdentifier const): Deleted.
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
Canonical link: https://commits.webkit.org/286161@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes