mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Ladybird: Use MachPortServer to get WebContent Mach ports on macOS
This commit is contained in:
parent
8c5e64e686
commit
3b5ac433ef
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/ADKaster
Commit: 3b5ac433ef
Pull-request: https://github.com/SerenityOS/serenity/pull/23841
Reviewed-by: https://github.com/bugaevc
Reviewed-by: https://github.com/nico ✅
Reviewed-by: https://github.com/trflynn89 ✅
7 changed files with 58 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue