LibWebView+UI: Acquire the paths to helper processes inside LibWebView

We no longer need to acquire these paths from the UI and pass them into
LibWebView - we can figure out these paths internally.
This commit is contained in:
Timothy Flynn 2024-11-13 16:04:33 -05:00 committed by Andreas Kling
commit 652dde5022
Notes: github-actions[bot] 2024-11-14 10:48:35 +00:00
7 changed files with 20 additions and 40 deletions

View file

@ -18,7 +18,6 @@
#include <LibWebView/HelperProcess.h>
#include <LibWebView/URL.h>
#include <LibWebView/UserAgent.h>
#include <LibWebView/Utilities.h>
#include <LibWebView/WebContentClient.h>
namespace WebView {
@ -180,16 +179,13 @@ ErrorOr<void> Application::launch_services()
ErrorOr<void> Application::launch_request_server()
{
// FIXME: Create an abstraction to re-spawn the RequestServer and re-hook up its client hooks to each tab on crash
auto paths = TRY(get_paths_for_helper_process("RequestServer"sv));
m_request_server_client = TRY(launch_request_server_process(paths));
m_request_server_client = TRY(launch_request_server_process());
return {};
}
ErrorOr<void> Application::launch_image_decoder_server()
{
auto paths = TRY(get_paths_for_helper_process("ImageDecoder"sv));
m_image_decoder_client = TRY(launch_image_decoder_process(paths));
m_image_decoder_client = TRY(launch_image_decoder_process());
m_image_decoder_client->on_death = [this]() {
m_image_decoder_client = nullptr;