mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibIPC+LibWeb: Delete LargeMessageWrapper workaround in IPC connection
It's no longer needed because TransportSocket is now capable of properly sending large messages.
This commit is contained in:
parent
d6080d1fdc
commit
2d625f5c23
Notes:
github-actions[bot]
2025-04-09 23:31:02 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 2d625f5c23
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4304
11 changed files with 23 additions and 177 deletions
|
@ -8,14 +8,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/AnonymousBuffer.h>
|
||||
#include <LibCore/Forward.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibIPC/Transport.h>
|
||||
#include <LibIPC/UnprocessedFileDescriptors.h>
|
||||
|
||||
namespace IPC {
|
||||
|
||||
|
@ -67,30 +61,4 @@ protected:
|
|||
Message() = default;
|
||||
};
|
||||
|
||||
class LargeMessageWrapper : public Message {
|
||||
public:
|
||||
~LargeMessageWrapper() override = default;
|
||||
|
||||
static constexpr int MESSAGE_ID = 0x0;
|
||||
|
||||
static NonnullOwnPtr<LargeMessageWrapper> create(u32 endpoint_magic, MessageBuffer& buffer_to_wrap);
|
||||
|
||||
u32 endpoint_magic() const override { return m_endpoint_magic; }
|
||||
int message_id() const override { return MESSAGE_ID; }
|
||||
char const* message_name() const override { return "LargeMessageWrapper"; }
|
||||
ErrorOr<MessageBuffer> encode() const override;
|
||||
|
||||
static ErrorOr<NonnullOwnPtr<LargeMessageWrapper>> decode(u32 endpoint_magic, Stream& stream, UnprocessedFileDescriptors& files);
|
||||
|
||||
ReadonlyBytes wrapped_message_data() const { return ReadonlyBytes { m_wrapped_message_data.data<u8>(), m_wrapped_message_data.size() }; }
|
||||
auto take_fds() { return move(m_wrapped_fds); }
|
||||
|
||||
LargeMessageWrapper(u32 endpoint_magic, Core::AnonymousBuffer wrapped_message_data, Vector<IPC::File>&& wrapped_fds);
|
||||
|
||||
private:
|
||||
u32 m_endpoint_magic { 0 };
|
||||
Core::AnonymousBuffer m_wrapped_message_data;
|
||||
Vector<File> m_wrapped_fds;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue