[heap] Do not delay mark-compact in Heap::CollectGarbage if incremental

marking needs finalization.

TBR=mlippautz@chromium.org
BUG=chromium:671994,chromium:670675

Review-Url: https://codereview.chromium.org/2560813002
Cr-Commit-Position: refs/heads/master@{#41558}
This commit is contained in:
ulan 2016-12-07 08:32:52 -08:00 committed by Commit bot
parent 582cdddeb4
commit ebb1aff1e6

View File

@ -962,6 +962,7 @@ bool Heap::CollectGarbage(GarbageCollector collector,
!ShouldFinalizeIncrementalMarking() && !ShouldAbortIncrementalMarking() &&
!incremental_marking()->IsStopped() &&
!incremental_marking()->should_hurry() &&
!incremental_marking()->NeedsFinalization() &&
!IsCloseToOutOfMemory(new_space_->Capacity())) {
if (!incremental_marking()->IsComplete() &&
!mark_compact_collector()->marking_deque()->IsEmpty() &&