[webkit-changes] [WebKit/WebKit] 07a07b: Handle async messages generically with StreamServe...
Kimmo Kinnunen
noreply at github.com
Mon Sep 23 23:03:40 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 07a07b4b188020d6a6a3a77a9de867254b121977
https://github.com/WebKit/WebKit/commit/07a07b4b188020d6a6a3a77a9de867254b121977
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2024-09-23 (Mon, 23 Sep 2024)
Changed paths:
M Source/WebKit/Platform/IPC/Connection.h
M Source/WebKit/Platform/IPC/HandleMessage.h
M Source/WebKit/Platform/IPC/StreamServerConnection.cpp
M Source/WebKit/Platform/IPC/StreamServerConnection.h
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Scripts/webkit/tests/TestWithStreamBatchedMessageReceiver.cpp
M Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp
M Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp
Log Message:
-----------
Handle async messages generically with StreamServerConnection
https://bugs.webkit.org/show_bug.cgi?id=280177
rdar://136491153
Reviewed by Antti Koivisto.
Previously, the messages.py code generator would generate async sends
with connection.protectedConnection(). The connection parameter itself
is mostly only used for logging PIDs.
After, pass the actual `connection` to the handleMessage and
handleMessageAsync functions, and write them in the shared interface.
This way future code sharing between IPC::Connection and
IPC::StreamServerConnection is simpler, as well as sharing code between
sync and async messages.
* Source/WebKit/Platform/IPC/Connection.h:
(IPC::Connection::sendAsyncReply):
* Source/WebKit/Platform/IPC/HandleMessage.h:
(IPC::textStreamForLogging):
(IPC::logMessageImpl):
(IPC::logMessage):
(IPC::logReply):
(IPC::handleMessage):
(IPC::handleMessageSynchronous):
(IPC::handleMessageAsync):
* Source/WebKit/Platform/IPC/StreamServerConnection.cpp:
(IPC::StreamServerConnection::sendDeserializationErrorSyncReply):
* Source/WebKit/Platform/IPC/StreamServerConnection.h:
(IPC::StreamServerConnection::sendAsyncReply):
* Source/WebKit/Scripts/webkit/messages.py:
(async_message_statement):
(generate_message_handler):
* Source/WebKit/Scripts/webkit/tests/TestWithStreamBatchedMessageReceiver.cpp:
(WebKit::TestWithStreamBatched::didReceiveStreamMessage):
* Source/WebKit/Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:
(WebKit::TestWithStream::didReceiveStreamMessage):
* Tools/TestWebKitAPI/Tests/IPC/StreamConnectionTests.cpp:
Canonical link: https://commits.webkit.org/284138@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