summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-09-21 17:22:53 +0100
committerLinus Groh <mail@linusgroh.de>2022-09-21 20:42:36 +0100
commitfb2e1c46117ec802903255f04f9745c4b1be52cc (patch)
treee47b5d369722e0bc35e7b8a6f6f0852a061279bf /Userland/Utilities
parent6b2a916069a0df08856c6d9fa66c6bf5d0244df0 (diff)
downloadserenity-fb2e1c46117ec802903255f04f9745c4b1be52cc.zip
headless-browser: Install EventLoop and Font plugins so it doesn't crash
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/headless-browser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Utilities/headless-browser.cpp b/Userland/Utilities/headless-browser.cpp
index 350d69be13..58e151bfa9 100644
--- a/Userland/Utilities/headless-browser.cpp
+++ b/Userland/Utilities/headless-browser.cpp
@@ -40,6 +40,8 @@
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/Page.h>
#include <LibWeb/Painting/PaintableBox.h>
+#include <LibWeb/Platform/EventLoopPluginSerenity.h>
+#include <LibWeb/Platform/FontPluginSerenity.h>
#include <LibWeb/Platform/ImageCodecPlugin.h>
#include <LibWeb/WebSockets/WebSocket.h>
#include <LibWebSocket/ConnectionInfo.h>
@@ -668,6 +670,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_positional_argument(url, "URL to open", "url", Core::ArgsParser::Required::Yes);
args_parser.parse(arguments);
+ Web::Platform::EventLoopPlugin::install(*new Web::Platform::EventLoopPluginSerenity);
+ Web::Platform::FontPlugin::install(*new Web::Platform::FontPluginSerenity);
Web::Platform::ImageCodecPlugin::install(*new ImageCodecPluginHeadless);
Web::ResourceLoader::initialize(HeadlessRequestServer::create());
Web::WebSockets::WebSocketClientManager::initialize(HeadlessWebSocketClientManager::create());