1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:57:35 +00:00

Revert "LibThreading: Fix BackgroundAction result use-after-free"

This reverts commit b2e6088bff.

This was a speculative fix that ended up not fixing the issue.
This commit is contained in:
Andreas Kling 2021-07-12 11:29:37 +02:00
parent 026ffa343d
commit 2e3df52862

View file

@ -66,8 +66,8 @@ private:
enqueue_work([this] { enqueue_work([this] {
m_result = m_action(*this); m_result = m_action(*this);
if (m_on_complete) { if (m_on_complete) {
Core::EventLoop::current().post_event(*this, make<Core::DeferredInvocationEvent>([this, result = m_result.release_value()](auto&) { Core::EventLoop::current().post_event(*this, make<Core::DeferredInvocationEvent>([this](auto&) {
m_on_complete(result); m_on_complete(m_result.release_value());
this->remove_from_parent(); this->remove_from_parent();
})); }));
Core::EventLoop::wake(); Core::EventLoop::wake();