mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
LibThreading: Register BackgroundAction with EventLoop
BackgroundActions are now added as a job to the event loop, therefore they get canceled when the loop exits and their on_complete action never runs. This fixes all UAF bugs related to BackgroundAction's use of EventLoops, as seen with e.g. thumbnail generation.
This commit is contained in:
parent
8f4d0d3797
commit
cf1fa419ab
4 changed files with 72 additions and 39 deletions
|
@ -135,7 +135,7 @@ void FileProvider::query(DeprecatedString const& query, Function<void(Vector<Non
|
|||
Vector<NonnullRefPtr<Result>> results;
|
||||
|
||||
for (auto& path : m_full_path_cache) {
|
||||
if (task.is_cancelled())
|
||||
if (task.is_canceled())
|
||||
return {};
|
||||
|
||||
auto match_result = fuzzy_match(query, path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue