Commit 3a16caa5 authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] GcAndSweep needs safepoint for EnsureSweepingCompleted()

Bug: v8:10315
Change-Id: Id7d5600e07cd0dfbce409925acf6047e019f501c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352769Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69370}
parent df32131b
......@@ -206,6 +206,7 @@ void AbandonCurrentlyFreeMemory(PagedSpace* space) {
void GcAndSweep(Heap* heap, AllocationSpace space) {
heap->CollectGarbage(space, GarbageCollectionReason::kTesting);
if (heap->mark_compact_collector()->sweeping_in_progress()) {
SafepointScope scope(heap);
heap->mark_compact_collector()->EnsureSweepingCompleted();
}
}
......
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