Revert "LibIPC+LibWeb: Delete LargeMessageWrapper workaround in IPC…

…connection"

This reverts commit 2d625f5c23.
This commit is contained in:
Tim Ledbetter 2025-04-10 12:49:50 +01:00 committed by Tim Ledbetter
commit 1ee56d34e7
Notes: github-actions[bot] 2025-04-10 15:25:37 +00:00
11 changed files with 177 additions and 23 deletions

View file

@ -404,7 +404,7 @@ public:)~~~");
static i32 static_message_id() { return (int)MessageID::@message.pascal_name@; }
virtual const char* message_name() const override { return "@endpoint.name@::@message.pascal_name@"; }
static ErrorOr<NonnullOwnPtr<@message.pascal_name@>> decode(Stream& stream, Queue<IPC::File>& files)
static ErrorOr<NonnullOwnPtr<@message.pascal_name@>> decode(Stream& stream, IPC::UnprocessedFileDescriptors& files)
{
IPC::Decoder decoder { stream, files };)~~~");
@ -649,7 +649,7 @@ void generate_proxy_method(SourceGenerator& message_generator, Endpoint const& e
}
} else {
message_generator.append(R"~~~());
MUST(m_connection.post_message(move(message_buffer))); )~~~");
MUST(m_connection.post_message(@endpoint.magic@, move(message_buffer))); )~~~");
}
message_generator.appendln(R"~~~(
@ -720,7 +720,7 @@ public:
static u32 static_magic() { return @endpoint.magic@; }
static ErrorOr<NonnullOwnPtr<IPC::Message>> decode_message(ReadonlyBytes buffer, [[maybe_unused]] Queue<IPC::File>& files)
static ErrorOr<NonnullOwnPtr<IPC::Message>> decode_message(ReadonlyBytes buffer, [[maybe_unused]] IPC::UnprocessedFileDescriptors& files)
{
FixedMemoryStream stream { buffer };
auto message_endpoint_magic = TRY(stream.read_value<u32>());)~~~");
@ -757,6 +757,11 @@ public:
do_decode_message(message.response_name());
}
generator.append(R"~~~(
case (int)IPC::LargeMessageWrapper::MESSAGE_ID:
return TRY(IPC::LargeMessageWrapper::decode(message_endpoint_magic, stream, files));
)~~~");
generator.append(R"~~~(
default:)~~~");
if constexpr (GENERATE_DEBUG) {
@ -898,6 +903,7 @@ void build(StringBuilder& builder, Vector<Endpoint> const& endpoints)
#include <LibIPC/File.h>
#include <LibIPC/Message.h>
#include <LibIPC/Stub.h>
#include <LibIPC/UnprocessedFileDescriptors.h>
#if defined(AK_COMPILER_CLANG)
#pragma clang diagnostic push