mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWebView+LibCore: Manage process lifecycle using a SIGCHLD handler
This large commit also refactors LibWebView's process handling to use a top-level Application class that uses a new WebView::Process class to encapsulate the IPC-centric nature of each helper process.
This commit is contained in:
committed by
Alexander Kalenik
parent
3dea602d92
commit
4cc3d598f9
@@ -8,7 +8,7 @@
|
||||
#include "Utilities.h"
|
||||
#include <AK/Enumerate.h>
|
||||
#include <LibCore/Process.h>
|
||||
#include <LibWebView/ProcessManager.h>
|
||||
#include <LibWebView/Application.h>
|
||||
|
||||
template<typename ClientType, typename... ClientArguments>
|
||||
static ErrorOr<NonnullRefPtr<ClientType>> launch_server_process(
|
||||
@@ -45,7 +45,7 @@ static ErrorOr<NonnullRefPtr<ClientType>> launch_server_process(
|
||||
if constexpr (requires { process.client->set_pid(pid_t {}); })
|
||||
process.client->set_pid(process.process.pid());
|
||||
|
||||
WebView::ProcessManager::the().add_process(WebView::process_type_from_name(server_name), process.process.pid());
|
||||
WebView::Application::the().add_child_process(WebView::Process { WebView::process_type_from_name(server_name), process.client, move(process.process) });
|
||||
|
||||
if (enable_callgrind_profiling == Ladybird::EnableCallgrindProfiling::Yes) {
|
||||
dbgln();
|
||||
|
||||
Reference in New Issue
Block a user