diff --git a/Ladybird/AppKit/main.mm b/Ladybird/AppKit/main.mm index 567901714af..c24020e190d 100644 --- a/Ladybird/AppKit/main.mm +++ b/Ladybird/AppKit/main.mm @@ -88,6 +88,7 @@ ErrorOr serenity_main(Main::Arguments arguments) bool log_all_js_exceptions = false; bool enable_http_cache = false; bool new_window = false; + bool force_new_process = false; bool allow_popups = false; Core::ArgsParser args_parser; @@ -100,11 +101,12 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(log_all_js_exceptions, "Log all JavaScript exceptions", "log-all-js-exceptions"); args_parser.add_option(enable_http_cache, "Enable HTTP cache", "enable-http-cache"); args_parser.add_option(new_window, "Force opening in a new window", "new-window", 'n'); + args_parser.add_option(force_new_process, "Force creation of new browser/chrome process", "force-new-process"); args_parser.add_option(allow_popups, "Disable popup blocking by default", "allow-popups"); args_parser.parse(arguments); WebView::ChromeProcess chrome_process; - if (TRY(chrome_process.connect(raw_urls, new_window)) == WebView::ChromeProcess::ProcessDisposition::ExitProcess) { + if (!force_new_process && TRY(chrome_process.connect(raw_urls, new_window)) == WebView::ChromeProcess::ProcessDisposition::ExitProcess) { outln("Opening in existing process"); return 0; }