Skip to content

Truly independent web browser

LibWebView: Remove the deprecated force-new-process option

Timothy Flynn2c380fbe8aaa
diff --git a/Libraries/LibWebView/Application.cpp b/Libraries/LibWebView/Application.cpp
index 780241c8874..8e254b5ab9f 100644
--- a/Libraries/LibWebView/Application.cpp
+++ b/Libraries/LibWebView/Application.cpp
@@ -300,7 +300,6 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
Optional<u32> screenshot_delay;
Optional<StringView> screenshot_path;
bool new_window = false;
- bool force_new_process = false;
StringView stats_log_directory;
Optional<StringView> profile_name;
Optional<StringView> profile_path;
@@ -406,7 +405,6 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
});
args_parser.add_option(new_window, "Force opening in a new window", "new-window", 'n');
#if !defined(AK_OS_ANDROID)
- args_parser.add_option(force_new_process, "Force creation of a new browser process", "force-new-process");
args_parser.add_option(stats_log_directory, "Directory for process statistics (JSON lines)", "stats-log-dir", 0, "path");
args_parser.add_option(profile_name, "Select or create a named profile", "profile", 0, "name");
args_parser.add_option(profile_path, "Use a self-contained profile at an absolute path", "profile-path", 0, "path");
@@ -641,7 +639,7 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
};
create_platform_options(m_browser_options, m_request_server_options, m_web_content_options);
- TRY(create_profile(profile_name, profile_path, force_new_process, temporary_profile));
+ TRY(create_profile(profile_name, profile_path, temporary_profile));
// Browsers launched by WebDriver are driven directly and must never join an existing browser process. A browser
// that logs process statistics must not join one either, since that browser would not sample them.
@@ -753,18 +751,11 @@ ErrorOr<void> Application::initialize(Main::Arguments const& arguments)
return {};
}
-ErrorOr<void> Application::create_profile([[maybe_unused]] Optional<StringView> profile_name, [[maybe_unused]] Optional<StringView> profile_path, [[maybe_unused]] bool force_new_process, [[maybe_unused]] bool temporary_profile)
+ErrorOr<void> Application::create_profile([[maybe_unused]] Optional<StringView> profile_name, [[maybe_unused]] Optional<StringView> profile_path, [[maybe_unused]] bool temporary_profile)
{
#if !defined(AK_OS_ANDROID)
ProfileSelection profile_selection { .temporary = temporary_profile };
- if (force_new_process) {
- if (profile_name.has_value() || profile_path.has_value() || temporary_profile)
- return Error::from_string_literal("--force-new-process cannot be combined with another profile selector");
- warnln("--force-new-process is deprecated; using --temporary-profile");
- profile_selection.temporary = true;
- }
-
if (profile_name.has_value())
profile_selection.name = profile_name->to_byte_string();
if (profile_path.has_value())
diff --git a/Libraries/LibWebView/Application.h b/Libraries/LibWebView/Application.h
index d7bdda48980..a12114157d3 100644
--- a/Libraries/LibWebView/Application.h
+++ b/Libraries/LibWebView/Application.h
@@ -438,7 +438,7 @@ protected:
bool has_spare_web_content_process() const { return m_spare_web_content_process; }
private:
- ErrorOr<void> create_profile(Optional<StringView> profile_name, Optional<StringView> profile_path, bool force_new_process, bool temporary_profile);
+ ErrorOr<void> create_profile(Optional<StringView> profile_name, Optional<StringView> profile_path, bool temporary_profile);
void create_mach_port_server(ByteString const& profile_identity);
void update_website_color_scheme();
ErrorOr<NonnullRefPtr<WebContentClient>> create_web_content_client(BrowsingSession&, Web::PageId initial_page_id, Optional<Web::HTML::CrossProcessId> navigable_to_adopt = {}, Optional<Web::HTML::CrossProcessId> initial_document_state_id = {}, Vector<Web::HTML::RemoteNavigableDescriptor> remote_navigables = {}, Optional<Web::HTML::SessionHistoryEntryDescriptor> canonical_initial_history_entry = {}, Web::HTML::VisibilityState system_visibility_state = Web::HTML::VisibilityState::Hidden);
diff --git a/Tests/LibWeb/test-web/CMakeLists.txt b/Tests/LibWeb/test-web/CMakeLists.txt
index 082a6cbe96a..c1d93d2bea8 100644
--- a/Tests/LibWeb/test-web/CMakeLists.txt
+++ b/Tests/LibWeb/test-web/CMakeLists.txt
@@ -44,7 +44,7 @@ if (BUILD_TESTING)
add_test(
NAME LibWebUIProcessSessionHistory
COMMAND $<TARGET_FILE:test-web> --per-test-timeout 120
- --force-new-process --run-ui-process-session-history-tests -f "Text/input/navigation/*"
+ --temporary-profile --run-ui-process-session-history-tests -f "Text/input/navigation/*"
--results-dir test-dumps/ui-process-session-history-results
)