Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index cfeda5d55711a71cd650131edd145da162d9e986..92ca9a9f9395001389b893e142072e40d07a5c30 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1353,8 +1353,9 @@ bool Heap::PerformGarbageCollection( |
MinorMarkCompact(); |
break; |
case SCAVENGER: |
- if (fast_promotion_mode_ && |
- CanExpandOldGeneration(new_space()->Size())) { |
+ if ((fast_promotion_mode_ && |
+ CanExpandOldGeneration(new_space()->Size())) || |
+ concurrent_marking_->IsTaskPending()) { |
tracer()->NotifyYoungGenerationHandling( |
YoungGenerationHandling::kFastPromotionDuringScavenge); |
EvacuateYoungGeneration(); |
@@ -1626,8 +1627,10 @@ class ScavengeWeakObjectRetainer : public WeakObjectRetainer { |
void Heap::EvacuateYoungGeneration() { |
TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_EVACUATE); |
- DCHECK(fast_promotion_mode_); |
- DCHECK(CanExpandOldGeneration(new_space()->Size())); |
+ if (!FLAG_concurrent_marking) { |
+ DCHECK(fast_promotion_mode_); |
+ DCHECK(CanExpandOldGeneration(new_space()->Size())); |
+ } |
mark_compact_collector()->sweeper().EnsureNewSpaceCompleted(); |