Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index 64d8c056c8eba2b6721d46870c5c5d957e452074..2a799e3d85bdf18a6f7f95077126e9bb07296385 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -121,11 +121,12 @@ void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj) { |
heap_->mark_compact_collector()->marking_deque()->Push(obj); |
} |
- |
-static void MarkObjectGreyDoNotEnqueue(Object* obj) { |
+static void WhiteToGreyIfWhiteDoNotEnqueue(Object* obj) { |
if (obj->IsHeapObject()) { |
ulan
2017/03/03 12:53:13
Can we just inline this at the callsite? Looks lik
Hannes Payer (out of office)
2017/03/03 13:07:08
Done.
|
HeapObject* heap_obj = HeapObject::cast(obj); |
- ObjectMarking::AnyToGrey(heap_obj); |
+ if (ObjectMarking::IsWhite(heap_obj)) { |
+ ObjectMarking::WhiteToGrey(heap_obj); |
+ } |
} |
} |
@@ -227,7 +228,7 @@ class IncrementalMarkingMarkingVisitor |
// so the cache can be undefined. |
Object* cache = context->get(Context::NORMALIZED_MAP_CACHE_INDEX); |
if (!cache->IsUndefined(map->GetIsolate())) { |
- MarkObjectGreyDoNotEnqueue(cache); |
+ WhiteToGreyIfWhiteDoNotEnqueue(cache); |
} |
VisitNativeContext(map, context); |
} |