Commit f5ac0c1f authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap] Timer might not be started after shutdown

The timer might not be started when the main thread starts shutdown
between a background thread invoking RequestGC() and
AwaitCollectionBackground().

Add early bailout to AwaitCollectionBackground() in case shutdown
was already initiated.

Bug: v8:11823
Change-Id: Id646cdefa99adb04553c21337ad19538071ee3d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2919957Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74808}
parent 7ff6609a
......@@ -71,6 +71,7 @@ bool CollectionBarrier::AwaitCollectionBackground(LocalHeap* local_heap) {
// Update flag before parking this thread, this guarantees that the flag is
// set before the next GC.
base::MutexGuard guard(&mutex_);
if (shutdown_requested_) return false;
first_thread = !block_for_collection_;
block_for_collection_ = true;
CHECK(timer_.IsStarted());
......
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