Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index e5c65705c9726b7245eb3361af4566df77e68c20..77eee708c75bdba116404394494c6990899e88d2 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -1102,8 +1102,10 @@ size_t IncrementalMarking::StepSizeToMakeProgress() { |
} |
void IncrementalMarking::AdvanceIncrementalMarkingOnAllocation() { |
+ // Code using an AlwaysAllocateScope assumes that the GC state does not |
+ // change; that implies that no marking steps must be performed. |
if (heap_->gc_state() != Heap::NOT_IN_GC || !FLAG_incremental_marking || |
- (state_ != SWEEPING && state_ != MARKING)) { |
+ (state_ != SWEEPING && state_ != MARKING) || heap_->always_allocate()) { |
return; |
} |