mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibCore: Exit EventLoop::spin_until() when exit requested
This keeps WebContent from staying open if it's spinning forever trying to load a page.
This commit is contained in:
parent
dc5d85b609
commit
da96c151ab
Notes:
sideshowbarker
2024-07-16 20:44:03 +09:00
Author: https://github.com/petelliott 🔰
Commit: da96c151ab
Pull-request: https://github.com/SerenityOS/serenity/pull/19956
Issue: https://github.com/SerenityOS/serenity/issues/11854
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ int EventLoop::exec()
|
|||
void EventLoop::spin_until(Function<bool()> goal_condition)
|
||||
{
|
||||
EventLoopPusher pusher(*this);
|
||||
while (!goal_condition())
|
||||
while (!m_impl->was_exit_requested() && !goal_condition())
|
||||
pump();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue