mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibIPC+LibWeb: Delete LargeMessageWrapper workaround in IPC connection
Bring back 2d625f5c23
This commit is contained in:
committed by
Alexander Kalenik
parent
681333d329
commit
b53694b4c0
Notes:
github-actions[bot]
2025-04-10 21:41:01 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/b53694b4c09 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4313 Reviewed-by: https://github.com/ADKaster
@@ -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, IPC::UnprocessedFileDescriptors& files)
|
||||
static ErrorOr<NonnullOwnPtr<@message.pascal_name@>> decode(Stream& stream, Queue<IPC::File>& 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(@endpoint.magic@, move(message_buffer))); )~~~");
|
||||
MUST(m_connection.post_message(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]] IPC::UnprocessedFileDescriptors& files)
|
||||
static ErrorOr<NonnullOwnPtr<IPC::Message>> decode_message(ReadonlyBytes buffer, [[maybe_unused]] Queue<IPC::File>& files)
|
||||
{
|
||||
FixedMemoryStream stream { buffer };
|
||||
auto message_endpoint_magic = TRY(stream.read_value<u32>());)~~~");
|
||||
@@ -757,11 +757,6 @@ 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) {
|
||||
@@ -903,7 +898,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user