LibIPC+LibWeb: Introduce IPC::Attachment abstraction

Replace IPC::File / AutoCloseFileDescriptor / MessageFileType in
the IPC message pipeline with a new IPC::Attachment class. This
wraps a file descriptor transferred alongside IPC messages, and
provides a clean extension point for platform-specific transport
mechanisms (e.g., Mach ports on macOS) that will be introduced later.
This commit is contained in:
Aliaksandr Kalenik
2026-03-13 17:11:22 +01:00
committed by Alexander Kalenik
parent d094de39fc
commit da6b928909
Notes: github-actions[bot] 2026-03-13 19:23:49 +00:00
20 changed files with 162 additions and 78 deletions

View File

@@ -294,7 +294,7 @@ void MessagePort::read_from_transport()
auto schedule_shutdown = m_transport->read_as_many_messages_as_possible_without_blocking([this](auto&& raw_message) {
FixedMemoryStream stream { raw_message.bytes.span(), FixedMemoryStream::Mode::ReadOnly };
IPC::Decoder decoder { stream, raw_message.fds };
IPC::Decoder decoder { stream, raw_message.attachments };
auto serialized_transfer_record = MUST(decoder.decode<SerializedTransferRecord>());