summaryrefslogtreecommitdiff
path: root/Ladybird/WebContent
diff options
context:
space:
mode:
authormartinfalisse <martinmotteditfalisse@gmail.com>2023-05-05 19:48:48 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-08 14:47:52 +0200
commit00e446facd37f0d6784a9ca4890d26167fd34514 (patch)
tree87595d671e35591023db6daa934e6835dfa6b1ca /Ladybird/WebContent
parent65c7145e695ad3ec855084d833e99ae5c021d54c (diff)
downloadserenity-00e446facd37f0d6784a9ca4890d26167fd34514.zip
Ladybird: Move arguments parsing before FontPluginQt init
In a future commit will pass arguments parsed to the FontPluginQt constructor.
Diffstat (limited to 'Ladybird/WebContent')
-rw-r--r--Ladybird/WebContent/main.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Ladybird/WebContent/main.cpp b/Ladybird/WebContent/main.cpp
index b715203079..f0a044cc20 100644
--- a/Ladybird/WebContent/main.cpp
+++ b/Ladybird/WebContent/main.cpp
@@ -62,6 +62,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Web::FrameLoader::set_default_favicon_path(DeprecatedString::formatted("{}/res/icons/16x16/app-browser.png", s_serenity_resource_root));
+ int webcontent_fd_passing_socket { -1 };
+
+ Core::ArgsParser args_parser;
+ args_parser.add_option(webcontent_fd_passing_socket, "File descriptor of the passing socket for the WebContent connection", "webcontent-fd-passing-socket", 'c', "webcontent_fd_passing_socket");
+ args_parser.parse(arguments);
+
+ VERIFY(webcontent_fd_passing_socket >= 0);
+
Web::Platform::FontPlugin::install(*new Ladybird::FontPluginQt);
Web::FrameLoader::set_error_page_url(DeprecatedString::formatted("file://{}/res/html/error.html", s_serenity_resource_root));
@@ -76,14 +84,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (maybe_autoplay_allowlist_error.is_error())
dbgln("Failed to load autoplay allowlist: {}", maybe_autoplay_allowlist_error.error());
- int webcontent_fd_passing_socket { -1 };
-
- Core::ArgsParser args_parser;
- args_parser.add_option(webcontent_fd_passing_socket, "File descriptor of the passing socket for the WebContent connection", "webcontent-fd-passing-socket", 'c', "webcontent_fd_passing_socket");
- args_parser.parse(arguments);
-
- VERIFY(webcontent_fd_passing_socket >= 0);
-
auto webcontent_socket = TRY(Core::take_over_socket_from_system_server("WebContent"sv));
auto webcontent_client = TRY(WebContent::ConnectionFromClient::try_create(move(webcontent_socket)));
webcontent_client->set_fd_passing_socket(TRY(Core::LocalSocket::adopt_fd(webcontent_fd_passing_socket)));