diff --git a/src/heap/cppgc-js/cpp-heap.cc b/src/heap/cppgc-js/cpp-heap.cc index 2a9742b1ea..084965d1a5 100644 --- a/src/heap/cppgc-js/cpp-heap.cc +++ b/src/heap/cppgc-js/cpp-heap.cc @@ -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();