LibWebView: Remove m_in_shutdown in favor of event loop's exit request

This commit is contained in:
Jelle Raaijmakers 2025-08-18 00:42:15 +02:00 committed by Tim Flynn
commit 9e4b6c1ded
Notes: github-actions[bot] 2025-08-18 00:53:22 +00:00
2 changed files with 2 additions and 5 deletions

View file

@ -517,9 +517,7 @@ ErrorOr<int> Application::execute()
} }
} }
int ret = m_event_loop->exec(); return m_event_loop->exec();
m_in_shutdown = true;
return ret;
} }
NonnullOwnPtr<Core::EventLoop> Application::create_platform_event_loop() NonnullOwnPtr<Core::EventLoop> Application::create_platform_event_loop()
@ -546,7 +544,7 @@ Optional<Process&> Application::find_process(pid_t pid)
void Application::process_did_exit(Process&& process) void Application::process_did_exit(Process&& process)
{ {
if (m_in_shutdown) if (m_event_loop->was_exit_requested())
return; return;
dbgln_if(WEBVIEW_PROCESS_DEBUG, "Process {} died, type: {}", process.pid(), process_name_from_type(process.type())); dbgln_if(WEBVIEW_PROCESS_DEBUG, "Process {} died, type: {}", process.pid(), process_name_from_type(process.type()));

View file

@ -146,7 +146,6 @@ private:
OwnPtr<Core::EventLoop> m_event_loop; OwnPtr<Core::EventLoop> m_event_loop;
OwnPtr<ProcessManager> m_process_manager; OwnPtr<ProcessManager> m_process_manager;
bool m_in_shutdown { false };
#if defined(AK_OS_MACOS) #if defined(AK_OS_MACOS)
OwnPtr<MachPortServer> m_mach_port_server; OwnPtr<MachPortServer> m_mach_port_server;