[webkit-changes] [WebKit/WebKit] 35edbf: Runtime reachability of IPC endpoints should be de...

Gavin noreply at github.com
Thu Aug 17 14:35:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 35edbfdbf97e524b704fa8da7ef287848c19bae3
      https://github.com/WebKit/WebKit/commit/35edbfdbf97e524b704fa8da7ef287848c19bae3
  Author: Gavin Phillips <gavin.p at apple.com>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/ipc/restrictedendpoints/allow-access-attachmentElement-expected.txt
    A LayoutTests/ipc/restrictedendpoints/allow-access-attachmentElement.html
    A LayoutTests/ipc/restrictedendpoints/allow-access-modelElement-expected.txt
    A LayoutTests/ipc/restrictedendpoints/allow-access-modelElement.html
    A LayoutTests/ipc/restrictedendpoints/allow-access-webGPU-expected.txt
    A LayoutTests/ipc/restrictedendpoints/allow-access-webGPU.html
    A LayoutTests/ipc/restrictedendpoints/deny-access-attachmentElement-expected.txt
    A LayoutTests/ipc/restrictedendpoints/deny-access-attachmentElement.html
    A LayoutTests/ipc/restrictedendpoints/deny-access-modelElement-expected.txt
    A LayoutTests/ipc/restrictedendpoints/deny-access-modelElement.html
    A LayoutTests/ipc/restrictedendpoints/deny-access-updateQuotaBasedOnSpaceUsageForTesting-expected.txt
    A LayoutTests/ipc/restrictedendpoints/deny-access-webGPU-expected.txt
    A LayoutTests/ipc/restrictedendpoints/deny-access-webGPU.html
    A LayoutTests/ipc/restrictedendpoints/deny-access-webPush-expected.txt
    M LayoutTests/ipc/restrictedendpoints/deny-access-webPush.html
    A LayoutTests/ipc/restrictedendpoints/no-test-only-ipc-expected-crash-expected.txt
    M LayoutTests/ipc/restrictedendpoints/no-test-only-ipc-expected-crash.html
    M LayoutTests/platform/glib/ipc/restrictedendpoints/no-test-only-ipc-expected-crash-expected.txt
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in
    M Source/WebKit/GPUProcess/GPUProcess.cpp
    M Source/WebKit/GPUProcess/GPUProcess.h
    M Source/WebKit/GPUProcess/GPUProcess.messages.in
    M Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.cpp
    M Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.h
    M Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.messages.in
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Scripts/webkit/messages_unittest.py
    M Source/WebKit/Scripts/webkit/model.py
    M Source/WebKit/Scripts/webkit/parser.py
    M Source/WebKit/Scripts/webkit/tests/Makefile
    M Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
    M Source/WebKit/Scripts/webkit/tests/MessageNames.cpp
    M Source/WebKit/Scripts/webkit/tests/MessageNames.h
    A Source/WebKit/Scripts/webkit/tests/TestWithEnabledIf.messages.in
    A Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessageReceiver.cpp
    A Source/WebKit/Scripts/webkit/tests/TestWithEnabledIfMessages.h
    M Source/WebKit/Shared/GPUProcessConnectionParameters.h
    M Source/WebKit/Shared/GPUProcessConnectionParameters.serialization.in
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.messages.in
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.h

  Log Message:
  -----------
  Runtime reachability of IPC endpoints should be defined within the .messages.in files
https://bugs.webkit.org/show_bug.cgi?id=259552
rdar://112970535

Reviewed by Alex Christensen.

We should define the runtime reachability of IPC endpoints consistently
within the .messages.in files. Previously, this was achieved by a series
of MESSAGE_CHECKS placed within the receiving handlers. This change
introduces an [EnabledIf=""] attribute, which can be used within the
.messages.in files, which defines additional criteria which must be met at
runtime in order for the receiving handler to be invoked. Any messages received
which don't satisfy the additional criteria are dropped the same way as
if the endpoint had received a message it didn't know about.

* LayoutTests/TestExpectations:
* LayoutTests/ipc/restrictedendpoints/allow-access-attachmentElement-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/allow-access-attachmentElement.html: Added.
* LayoutTests/ipc/restrictedendpoints/allow-access-modelElement-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/allow-access-modelElement.html: Added.
* LayoutTests/ipc/restrictedendpoints/allow-access-webGPU-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/allow-access-webGPU.html: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-attachmentElement-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-attachmentElement.html: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-modelElement-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-modelElement.html: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-updateQuotaBasedOnSpaceUsageForTesting-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-webGPU-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-webGPU.html: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-webPush-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/deny-access-webPush.html:
* LayoutTests/ipc/restrictedendpoints/no-test-only-ipc-expected-crash-expected.txt: Added.
* LayoutTests/ipc/restrictedendpoints/no-test-only-ipc-expected-crash.html:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h:
(WebKit::GPUConnectionToWebProcess::isWebGPUEnabled):
(WebKit::GPUConnectionToWebProcess::isWebGLEnabled):
(WebKit::GPUConnectionToWebProcess::updateWebGLEnabled):
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in:
* Source/WebKit/GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::updateWebGLEnabled):
* Source/WebKit/GPUProcess/GPUProcess.h:
* Source/WebKit/GPUProcess/GPUProcess.messages.in:
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.cpp:
(WebKit::RemoteAudioSessionProxy::allowTestOnlyIPC):
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.h:
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.messages.in:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/Scripts/webkit/messages.py:
(async_message_statement):
(sync_message_statement):
* Source/WebKit/Scripts/webkit/model.py:
(Message.__init__):
* Source/WebKit/Scripts/webkit/parser.py:
(parse):
* Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::updateWebGLEnabled):
* Source/WebKit/UIProcess/GPU/GPUProcessProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPageProxy::attachmentElementEnabled):
(WebKit::WebPageProxy::modelElementEnabled):
(WebKit::WebPageProxy::launchProcess):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addExistingWebPage):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::updatePreferencesEnabledStateInGPUProcess):
(WebKit::WebProcessProxy::updateWebGPUEnabledStateInGPUProcess): Deleted.
* Source/WebKit/UIProcess/WebProcessProxy.h:

Canonical link: https://commits.webkit.org/267014@main




More information about the webkit-changes mailing list