mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
Ladybird+headless-browser: Make RequestServer single instance on Lagom
Co-Authored-By: Timothy Flynn <trflynn89@pm.me>
This commit is contained in:
@@ -132,12 +132,17 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
initial_urls.append(ak_string_from_qstring(new_tab_page));
|
||||
}
|
||||
|
||||
// NOTE: WebWorker *always* needs a request server connection, even if WebContent uses Qt Networking
|
||||
// FIXME: Create an abstraction to re-spawn the RequestServer and re-hook up its client hooks to each tab on crash
|
||||
auto request_server_paths = TRY(get_paths_for_helper_process("RequestServer"sv));
|
||||
auto protocol_client = TRY(launch_request_server_process(request_server_paths, s_serenity_resource_root, certificates));
|
||||
app.request_server_client = protocol_client;
|
||||
|
||||
StringBuilder command_line_builder;
|
||||
command_line_builder.join(' ', arguments.strings);
|
||||
Ladybird::WebContentOptions web_content_options {
|
||||
.command_line = MUST(command_line_builder.to_string()),
|
||||
.executable_path = MUST(String::from_byte_string(MUST(Core::System::current_executable_path()))),
|
||||
.certificates = move(certificates),
|
||||
.enable_callgrind_profiling = enable_callgrind_profiling ? Ladybird::EnableCallgrindProfiling::Yes : Ladybird::EnableCallgrindProfiling::No,
|
||||
.enable_gpu_painting = use_gpu_painting ? Ladybird::EnableGPUPainting::Yes : Ladybird::EnableGPUPainting::No,
|
||||
.use_lagom_networking = enable_qt_networking ? Ladybird::UseLagomNetworking::No : Ladybird::UseLagomNetworking::Yes,
|
||||
|
||||
Reference in New Issue
Block a user