mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
LibCore: Move deferred_invoke() implementation out of line
This commit is contained in:
parent
411d36719e
commit
029f5b0dad
Notes:
sideshowbarker
2024-07-17 02:42:21 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/029f5b0dad Pull-request: https://github.com/SerenityOS/serenity/pull/18493 Reviewed-by: https://github.com/FireFox317
@ -847,4 +847,15 @@ void EventLoop::wake()
|
||||
}
|
||||
}
|
||||
|
||||
void EventLoop::deferred_invoke(Function<void()> invokee)
|
||||
{
|
||||
auto context = DeferredInvocationContext::construct();
|
||||
post_event(context, make<Core::DeferredInvocationEvent>(context, move(invokee)));
|
||||
}
|
||||
|
||||
void deferred_invoke(Function<void()> invokee)
|
||||
{
|
||||
EventLoop::current().deferred_invoke(move(invokee));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <AK/Time.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <LibCore/DeferredInvocationContext.h>
|
||||
#include <LibCore/Event.h>
|
||||
#include <LibCore/Forward.h>
|
||||
#include <LibThreading/MutexProtected.h>
|
||||
@ -82,11 +81,7 @@ public:
|
||||
|
||||
void add_job(NonnullRefPtr<Promise<NonnullRefPtr<Object>>> job_promise);
|
||||
|
||||
void deferred_invoke(Function<void()> invokee)
|
||||
{
|
||||
auto context = DeferredInvocationContext::construct();
|
||||
post_event(context, make<Core::DeferredInvocationEvent>(context, move(invokee)));
|
||||
}
|
||||
void deferred_invoke(Function<void()>);
|
||||
|
||||
void wake();
|
||||
|
||||
@ -134,9 +129,6 @@ private:
|
||||
NonnullOwnPtr<Private> m_private;
|
||||
};
|
||||
|
||||
inline void deferred_invoke(Function<void()> invokee)
|
||||
{
|
||||
EventLoop::current().deferred_invoke(move(invokee));
|
||||
}
|
||||
void deferred_invoke(Function<void()>);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user