ladybird/Userland/Libraries/LibWebView/ProcessHandle.h
Timothy Flynn c7ef8530bf LibWebView: Explicitly inititalize the ProcessHandle PID
Avoids UB if the PID is read from without otherwise being initialized.
2024-04-22 14:46:10 -06:00

25 lines
475 B
C++

/*
* Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Types.h>
#include <LibIPC/Forward.h>
namespace WebView {
struct ProcessHandle {
// FIXME: Use mach_port_t on macOS/Hurd and HANDLE on Windows.
pid_t pid { -1 };
};
}
template<>
ErrorOr<void> IPC::encode(IPC::Encoder&, WebView::ProcessHandle const&);
template<>
ErrorOr<WebView::ProcessHandle> IPC::decode(IPC::Decoder&);