Skip to content
Snippets Groups Projects
Commit 333c465d authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ
Browse files

[platform] Only delete tasks after releasing the mutex

It leads to rare lock-order inversion problems if the foreground task
runner calls task destructors while holding the task runner's lock.
This currently happened when a new task was posted when the task runner
was already terminated. After normal execution we would only call the
destructor after releasing the lock anyway.

This CL ensures that the mutex is never held when calling a task
destructor.

R=mlippautz@chromium.org

Bug: 42204620
Change-Id: Ie895e5a605dff064bc5a4a90bdf1c7cdd4dc8cfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5718231


Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#95124}
parent aab2e742
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment