mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibWeb: Run queued promise jobs after callbacks
We now run queued promise jobs after calling event handler, timer, and requestAnimationFrame() callbacks - this is a bit ad-hoc, but I don't want to switch LibWeb to use an event loop right now - this works just fine, too. We might want to revisit this at a later point and do tasks and microtasks properly.
This commit is contained in:
parent
f418115f1b
commit
ade3adcc7a
Notes:
sideshowbarker
2024-07-18 20:54:51 +09:00
Author: https://github.com/linusg
Commit: ade3adcc7a
Pull-request: https://github.com/SerenityOS/serenity/pull/1706
Reviewed-by: https://github.com/Lubrsi
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/emanuele6
3 changed files with 12 additions and 2 deletions
|
@ -114,6 +114,8 @@ bool EventDispatcher::inner_invoke(Event& event, Vector<EventTarget::EventListen
|
|||
vm.clear_exception();
|
||||
// FIXME: Set legacyOutputDidListenersThrowFlag if given. (Only used by IndexedDB currently)
|
||||
}
|
||||
vm.run_queued_promise_jobs();
|
||||
VERIFY(!vm.exception());
|
||||
|
||||
event.set_in_passive_listener(false);
|
||||
if (is<Bindings::WindowObject>(global)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue