Commit 6315167f authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[Atomics.waitAsync] Fix: mark timeout task as cancelled properly

Bug: v8:10239, v8:10775
Change-Id: Ic12f9da7f8bb10f83c9e3c00f39a26412e058943
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2340904Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69257}
parent a55a2447
......@@ -749,12 +749,12 @@ void FutexEmulation::HandleAsyncWaiterTimeout(FutexWaitListNode* node) {
base::MutexGuard lock_guard(g_mutex.Pointer());
node->timeout_task_id_ = CancelableTaskManager::kInvalidTaskId;
if (!node->waiting_) {
// If the Node is not waiting, it's already scheduled to have its Promise
// resolved. Ignore the timeout.
return;
}
node->timeout_task_id_ = CancelableTaskManager::kInvalidTaskId;
g_wait_list.Pointer()->RemoveNode(node);
HandleScope handle_scope(node->isolate_for_async_waiters_);
ResolveAsyncWaiterPromise(node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment