mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibWeb: Move initialization of the MainThreadVM to WebContent's main()
It is a fallible operation, so this lets us abort early if it fails.
This commit is contained in:
parent
13dfadba79
commit
6e1b5b541a
4 changed files with 307 additions and 291 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <LibCore/System.h>
|
||||
#include <LibIPC/SingleServer.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Platform/EventLoopPlugin.h>
|
||||
#include <LibWeb/Platform/EventLoopPluginSerenity.h>
|
||||
|
@ -45,6 +46,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
|
||||
Web::WebSockets::WebSocketClientManager::initialize(TRY(WebView::WebSocketClientManagerAdapter::try_create()));
|
||||
Web::ResourceLoader::initialize(TRY(WebView::RequestServerAdapter::try_create()));
|
||||
TRY(Web::Bindings::initialize_main_thread_vm());
|
||||
|
||||
auto client = TRY(IPC::take_over_accepted_client_from_system_server<WebContent::ConnectionFromClient>());
|
||||
return event_loop.exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue