Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index b1738ee7256beb292c6f702fe69977ae1bde25f1..389edcd961c9f8ada4dbe7bbc468ae68285daccd 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(); |
} |
{ |
@@ -4410,7 +4412,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))) { |
@@ -5507,7 +5509,6 @@ void Heap::TearDown() { |
} |
store_buffer()->TearDown(); |
- incremental_marking()->TearDown(); |
isolate_->memory_allocator()->TearDown(); |
} |