mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-23 08:06:11 +00:00
Ladybird: Use MachPortServer to get WebContent Mach ports on macOS
This commit is contained in:
committed by
Andrew Kaster
parent
8c5e64e686
commit
3b5ac433ef
@@ -80,6 +80,12 @@ void ProcessManager::initialize()
|
||||
MUST(Core::System::sigaction(SIGCHLD, &action, nullptr));
|
||||
|
||||
the().add_process(WebView::ProcessType::Chrome, getpid());
|
||||
#ifdef AK_OS_MACH
|
||||
auto self_send_port = mach_task_self();
|
||||
auto res = mach_port_mod_refs(mach_task_self(), self_send_port, MACH_PORT_RIGHT_SEND, +1);
|
||||
VERIFY(res == KERN_SUCCESS);
|
||||
the().add_process(getpid(), Core::MachPort::adopt_right(self_send_port, Core::MachPort::PortRight::Send));
|
||||
#endif
|
||||
}
|
||||
|
||||
void ProcessManager::add_process(ProcessType type, pid_t pid)
|
||||
|
||||
Reference in New Issue
Block a user