Commit 488b0ff1 authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

cppgc-js: Fix DCHECK around completing sweeping

We only complete sweeping when the young generation GC is enabled.

Change-Id: I915acce35d6ba16716c2c4ee4130f99af0744f83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3900377Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83269}
parent 25c6d74e
......@@ -773,8 +773,6 @@ void CppHeap::TraceEpilogue() {
}
void CppHeap::RunMinorGC(StackState stack_state) {
DCHECK(!sweeper_.IsSweepingInProgress());
if (!generational_gc_supported()) return;
if (in_no_gc_scope()) return;
// Minor GC does not support nesting in full GCs.
......@@ -782,6 +780,8 @@ void CppHeap::RunMinorGC(StackState stack_state) {
// Minor GCs with the stack are currently not supported.
if (stack_state == StackState::kMayContainHeapPointers) return;
DCHECK(!sweeper_.IsSweepingInProgress());
// Notify GC tracer that CppGC started young GC cycle.
isolate_->heap()->tracer()->NotifyYoungCppGCRunning();
......
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