mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibCore: Don't require heap-allocated event to hold deferred invocation
Instead of creating a DeferredInvocationEvent every time we deferred_invoke, we now let the QueuedEvent store the invokee Function object directly.
This commit is contained in:
parent
69515f8c85
commit
2a1c5dc108
Notes:
github-actions[bot]
2025-12-03 12:27:45 +00:00
Author: https://github.com/awesomekling
Commit: 2a1c5dc108
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7004
6 changed files with 28 additions and 17 deletions
|
|
@ -29,6 +29,9 @@ public:
|
|||
void post_event(EventReceiver*, NonnullOwnPtr<Event>);
|
||||
void post_event(EventReceiver*, Core::Event::Type);
|
||||
|
||||
// Post a deferred invocation to the event queue.
|
||||
void deferred_invoke(Function<void()>&&);
|
||||
|
||||
// Used by Threading::BackgroundAction.
|
||||
void add_job(NonnullRefPtr<Promise<NonnullRefPtr<EventReceiver>>>);
|
||||
void cancel_all_pending_jobs();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue