Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 8802266d985654b1e4792f5cddb6fafd409e32da..abbccf09b530657e640938d8d3140fbc8621e144 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1322,18 +1322,6 @@ bool Heap::PerformGarbageCollection( |
isolate_->counters()->objs_since_last_young()->Set(0); |
- if (collector != SCAVENGER) { |
- // Callbacks that fire after this point might trigger nested GCs and |
- // restart incremental marking, the assertion can't be moved down. |
- DCHECK(incremental_marking()->IsStopped()); |
- |
- // We finished a marking cycle. We can uncommit the marking deque until |
- // we start marking again. |
- mark_compact_collector()->marking_deque()->Uninitialize(); |
- mark_compact_collector()->EnsureMarkingDequeIsCommitted( |
- MarkCompactCollector::kMinMarkingDequeSize); |
- } |
- |
gc_post_processing_depth_++; |
{ |
AllowHeapAllocation allow_allocation; |
@@ -1456,6 +1444,14 @@ void Heap::MarkCompactEpilogue() { |
incremental_marking()->Epilogue(); |
PreprocessStackTraces(); |
+ |
+ DCHECK(incremental_marking()->IsStopped()); |
+ |
+ // We finished a marking cycle. We can uncommit the marking deque until |
+ // we start marking again. |
+ mark_compact_collector()->marking_deque()->Uninitialize(); |
+ mark_compact_collector()->EnsureMarkingDequeIsCommitted( |
+ MarkCompactCollector::kMinMarkingDequeSize); |
} |