summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-07-06 21:50:45 +0200
committerAndreas Kling <kling@serenityos.org>2020-07-06 21:50:45 +0200
commita94ef9e0218f763ed6f8f93599c3d6da5dda46fa (patch)
treedf94541db2364b207e0c759fb34a851f80100fe8 /Applications
parentd8be535579534188c216f61787b633ed00ddacf1 (diff)
downloadserenity-a94ef9e0218f763ed6f8f93599c3d6da5dda46fa.zip
Browser: Add a way to start Browser in multi-process mode :^)
You can enable the new multi-process mode by using "Browser -m".
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Browser/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp
index 945c7d7f6d..ca5c606398 100644
--- a/Applications/Browser/main.cpp
+++ b/Applications/Browser/main.cpp
@@ -47,6 +47,7 @@ namespace Browser {
static const char* bookmarks_filename = "/home/anon/bookmarks.json";
String g_home_url;
URL url_from_user_input(const String& input);
+bool g_multi_process = false;
}
@@ -65,6 +66,7 @@ int main(int argc, char** argv)
const char* specified_url = nullptr;
Core::ArgsParser args_parser;
+ args_parser.add_option(Browser::g_multi_process, "Multi-process mode", "multi-process", 'm');
args_parser.add_positional_argument(specified_url, "URL to open", "url", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);
@@ -156,7 +158,7 @@ int main(int argc, char** argv)
Function<void(URL url, bool activate)> create_new_tab;
create_new_tab = [&](auto url, auto activate) {
- auto type = Browser::Tab::Type::InProcessWebView;
+ auto type = Browser::g_multi_process ? Browser::Tab::Type::OutOfProcessWebView : Browser::Tab::Type::InProcessWebView;
auto& new_tab = tab_widget.add_tab<Browser::Tab>("New tab", type);
tab_widget.set_bar_visible(!window->is_fullscreen() && tab_widget.children().size() > 1);