From fd86509ef85a729f0876079a955a37739e919ba4 Mon Sep 17 00:00:00 2001 From: Sebastian Zaha Date: Mon, 31 Jul 2023 22:52:34 +0200 Subject: [PATCH] Ladybird: Remove unused spawn helper The spawn_helper_process method was introduced together with get_paths_for_helper_process but was only ever used briefly to spawn WebContent. Other helper processes (SqlServer, headless_browser etc) are either execed or spawned with their own helpers & custom arguments. --- Ladybird/HelperProcess.cpp | 15 --------------- Ladybird/HelperProcess.h | 1 - 2 files changed, 16 deletions(-) diff --git a/Ladybird/HelperProcess.cpp b/Ladybird/HelperProcess.cpp index 5c8e1bec3db..57116233c94 100644 --- a/Ladybird/HelperProcess.cpp +++ b/Ladybird/HelperProcess.cpp @@ -6,23 +6,8 @@ #include "HelperProcess.h" #include "Utilities.h" -#include #include -ErrorOr spawn_helper_process(StringView process_name, ReadonlySpan arguments, Core::System::SearchInPath search_in_path, Optional> environment) -{ - auto paths = TRY(get_paths_for_helper_process(process_name)); - VERIFY(!paths.is_empty()); - ErrorOr result; - for (auto const& path : paths) { - result = Core::System::exec(path, arguments, search_in_path, environment); - if (!result.is_error()) - break; - } - - return result; -} - ErrorOr> get_paths_for_helper_process(StringView process_name) { auto application_path = TRY(ak_string_from_qstring(QCoreApplication::applicationDirPath())); diff --git a/Ladybird/HelperProcess.h b/Ladybird/HelperProcess.h index 6a42701ec23..9ad4fe10efc 100644 --- a/Ladybird/HelperProcess.h +++ b/Ladybird/HelperProcess.h @@ -12,5 +12,4 @@ #include #include -ErrorOr spawn_helper_process(StringView process_name, ReadonlySpan arguments, Core::System::SearchInPath, Optional> environment = {}); ErrorOr> get_paths_for_helper_process(StringView process_name);