LibWebView: Defer creating services until after application init

In particular, we need to defer creating the process manager until after
we have decided whether or not to create a UI-specific event loop. If we
create the process manager sooner, its event loop signal registration
does not work, and we don't handle child processes exiting.
This commit is contained in:
Timothy Flynn 2025-06-11 07:32:37 -04:00 committed by Tim Flynn
parent 39da2d9a2f
commit df0dc32006
Notes: github-actions[bot] 2025-06-11 12:27:34 +00:00
3 changed files with 29 additions and 28 deletions

View file

@ -59,8 +59,8 @@ void Application::create_platform_options(WebView::BrowserOptions&, WebView::Web
NonnullOwnPtr<Core::EventLoop> Application::create_platform_event_loop()
{
if (!browser_options().headless_mode.has_value()) {
m_application = make<LadybirdQApplication>(arguments());
Core::EventLoopManager::install(*new WebView::EventLoopManagerQt);
m_application = make<LadybirdQApplication>(arguments());
}
auto event_loop = WebView::Application::create_platform_event_loop();