Commit c19abadd authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Always use the passed-in collector in CollectGarbage.

Do not overwrite a collector decision.

BUG=

Review-Url: https://codereview.chromium.org/2336943003
Cr-Commit-Position: refs/heads/master@{#39585}
parent 06c6591d
......@@ -972,22 +972,6 @@ bool Heap::CollectGarbage(GarbageCollector collector,
}
}
if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() &&
!ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() &&
!incremental_marking()->should_hurry() && FLAG_incremental_marking &&
OldGenerationAllocationLimitReached()) {
if (!incremental_marking()->IsComplete() &&
!mark_compact_collector()->marking_deque_.IsEmpty() &&
!FLAG_gc_global) {
if (FLAG_trace_incremental_marking) {
isolate()->PrintWithTimestamp(
"[IncrementalMarking] Delaying MarkSweep.\n");
}
collector = SCAVENGER;
collector_reason = "incremental marking delaying mark-sweep";
}
}
bool next_gc_likely_to_collect_more = false;
intptr_t committed_memory_before = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment