Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 7c59c0471e4b81c74169ad75beff6a50776168e1..3db91ced8b44eed2654394303502700c1e50024f 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -686,8 +686,10 @@ void MarkCompactCollector::Prepare(GCTracer* tracer) { |
} |
#endif |
- // Clear marking bits for precise sweeping to collect all garbage. |
- if (was_marked_incrementally_ && PreciseSweepingRequired()) { |
+ // Clear marking bits if incremental marking is aborted (required for |
+ // precise sweeping to collect all garbage). |
+ ASSERT(abort_incremental_marking_ || !sweep_precisely_); |
+ if (was_marked_incrementally_ && abort_incremental_marking_) { |
heap()->incremental_marking()->Abort(); |
ClearMarkbits(); |
AbortCompaction(); |