Ladybird+LibWebView: Move SQLServer launcher to Ladybird

It previously resided in LibWebView to hide the details of launching a
singleton process. That functionality now lives in LibCore. By moving
this to Ladybird, we will be able to register the process with the task
manager.
This commit is contained in:
Timothy Flynn
2024-04-22 12:31:29 -04:00
committed by Andrew Kaster
parent 76af4503c1
commit f16f89eb32
17 changed files with 41 additions and 27 deletions

View File

@@ -7,6 +7,7 @@
#include "HelperProcess.h"
#include "Utilities.h"
#include <LibCore/Environment.h>
#include <LibCore/SingletonProcess.h>
#include <LibWebView/ProcessManager.h>
ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(
@@ -184,6 +185,12 @@ ErrorOr<NonnullRefPtr<Protocol::RequestClient>> launch_request_server_process(Re
return launch_generic_server_process<Protocol::RequestClient>(candidate_request_server_paths, "RequestServer"sv, move(arguments));
}
ErrorOr<NonnullRefPtr<SQL::SQLClient>> launch_sql_server_process(ReadonlySpan<ByteString> candidate_sql_server_paths)
{
auto [client, _] = TRY(Core::launch_singleton_process<SQL::SQLClient>("SQLServer"sv, candidate_sql_server_paths));
return client;
}
ErrorOr<IPC::File> connect_new_request_server_client(Protocol::RequestClient& client)
{
auto new_socket = client.send_sync_but_allow_failure<Messages::RequestServer::ConnectNewClient>();