[webkit-changes] [WebKit/WebKit] ead545: Only allow IPC messages to WebLockRegistryProxy wh...
Ryosuke Niwa
noreply at github.com
Mon Jul 29 12:56:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ead5451c43452e5fd76242d7eb0859bffd804794
https://github.com/WebKit/WebKit/commit/ead5451c43452e5fd76242d7eb0859bffd804794
Author: Ryosuke Niwa <rniwa at webkit.org>
Date: 2024-07-29 (Mon, 29 Jul 2024)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebKit/Scripts/PreferencesTemplates/SharedPreferencesForWebProcess.cpp.erb
M Source/WebKit/Scripts/PreferencesTemplates/SharedPreferencesForWebProcess.h.erb
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Scripts/webkit/model.py
M Source/WebKit/Scripts/webkit/parser.py
M Source/WebKit/Scripts/webkit/tests/TestWithEnabledIf.messages.in
M Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessageReceiver.cpp
M Source/WebKit/UIProcess/WebLockRegistryProxy.h
M Source/WebKit/UIProcess/WebLockRegistryProxy.messages.in
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebProcessProxy.cpp
M Source/WebKit/UIProcess/WebProcessProxy.h
Log Message:
-----------
Only allow IPC messages to WebLockRegistryProxy when WebLock is enabled
https://bugs.webkit.org/show_bug.cgi?id=277201
Reviewed by Sihui Liu.
This PR adds the support for specifying a runtime enablement of a message receiver and deploys
it in WebLockRegistryProxy so that it accepts IPC messages only when WebLock is enabled.
This PR also fixes a bug in WebProcessProxy that it could send/receive messages before
SharedPreferencesForWebProcess is initialized for a service worker's WebContent process by
ensuring the shared preferences are set in WebProcessProxy::establishRemoteWorkerContext.
Because we don't sometimes have access to WebPreferences (in particular, when it's establishing
remote worker context in WebProcessPool::establishRemoteWorkerContextConnectionToNetworkProcess)
when initializing service worker's WebContent process, this PR also updates
SharedPreferencesForWebProcess to take WebPreferencesStore instead of WebPreferences.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/Scripts/PreferencesTemplates/SharedPreferencesForWebProcess.cpp.erb:
* Source/WebKit/Scripts/PreferencesTemplates/SharedPreferencesForWebProcess.h.erb:
* Source/WebKit/Scripts/webkit/messages.py:
(generate_enabled_by_for_receiver):
(generate_message_handler):
* Source/WebKit/Scripts/webkit/model.py:
(MessageReceiver.__init__):
(generate_global_model):
* Source/WebKit/Scripts/webkit/parser.py:
(parse):
* Source/WebKit/Scripts/webkit/tests/TestWithEnabledIf.messages.in:
* Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessageReceiver.cpp:
(WebKit::TestWithEnabledIf::didReceiveMessage):
* Source/WebKit/UIProcess/WebLockRegistryProxy.h:
* Source/WebKit/UIProcess/WebLockRegistryProxy.messages.in:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::hasSameGPUAndNetworkProcessPreferencesAs const):
(WebKit::WebPageProxy::preferencesDidChange):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::initializePreferencesForGPUAndNetworkProcesses):
(WebKit::WebProcessProxy::hasSameGPUAndNetworkProcessPreferencesAs const):
(WebKit::WebProcessProxy::updateSharedPreferencesForWebProcess):
(WebKit::WebProcessProxy::establishRemoteWorkerContext):
* Source/WebKit/UIProcess/WebProcessProxy.h:
Canonical link: https://commits.webkit.org/281517@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list