Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 8415de1901d3944ea2713dc9cc59e15787941e19..2d25fe77309cd51e5bb22647c6d651d15a4bb9b5 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -768,7 +768,6 @@ void Heap::CollectAllAvailableGarbage(const char* gc_reason) { |
mark_compact_collector()->SetFlags(kNoGCFlags); |
new_space_.Shrink(); |
UncommitFromSpace(); |
- incremental_marking()->UncommitMarkingDeque(); |
} |
@@ -1133,6 +1132,9 @@ bool Heap::PerformGarbageCollection( |
amount_of_external_allocated_memory_; |
old_generation_allocation_limit_ = OldGenerationAllocationLimit( |
PromotedSpaceSizeOfObjects(), freed_global_handles); |
+ // We finished a marking cycle. We can uncommit the marking deque until |
+ // we start marking again. |
+ mark_compact_collector_.UncommitMarkingDeque(); |
} |
{ |
@@ -4389,7 +4391,7 @@ void Heap::TryFinalizeIdleIncrementalMarking( |
double idle_time_in_ms, size_t size_of_objects, |
size_t final_incremental_mark_compact_speed_in_bytes_per_ms) { |
if (incremental_marking()->IsComplete() || |
- (incremental_marking()->IsMarkingDequeEmpty() && |
+ (mark_compact_collector_.marking_deque()->IsEmpty() && |
gc_idle_time_handler_.ShouldDoFinalIncrementalMarkCompact( |
static_cast<size_t>(idle_time_in_ms), size_of_objects, |
final_incremental_mark_compact_speed_in_bytes_per_ms))) { |
@@ -5486,7 +5488,6 @@ void Heap::TearDown() { |
} |
store_buffer()->TearDown(); |
- incremental_marking()->TearDown(); |
isolate_->memory_allocator()->TearDown(); |
} |