mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Ladybird: Move arguments parsing before FontPluginQt init
In a future commit will pass arguments parsed to the FontPluginQt constructor.
This commit is contained in:
parent
65c7145e69
commit
00e446facd
1 changed files with 8 additions and 8 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Reference in a new issue