Chromium Code Reviews| Index: src/heap/mark-compact-inl.h |
| diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h |
| index d38e31e55602c14a874814ca5605facc46b61e43..015440bc40f222e314a11de2973cb23e981db854 100644 |
| --- a/src/heap/mark-compact-inl.h |
| +++ b/src/heap/mark-compact-inl.h |
| @@ -23,13 +23,21 @@ void MarkCompactCollector::SetFlags(int flags) { |
| } |
| +void MarkCompactCollector::PushBlack(HeapObject* obj) { |
|
Michael Lippautz
2015/08/14 12:44:36
Suggestion: We could return the status of the oper
Michael Starzinger
2015/08/14 13:23:13
Acknowledged. Would you be fine with doing this as
Michael Lippautz
2015/08/14 13:26:46
Sure.
|
| + if (marking_deque_.PushBlack(obj)) { |
| + MemoryChunk::IncrementLiveBytesFromGC(obj, obj->Size()); |
| + } else { |
| + Marking::BlackToGrey(obj); |
| + } |
| +} |
| + |
| + |
| void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) { |
| DCHECK(Marking::MarkBitFrom(obj) == mark_bit); |
| if (Marking::IsWhite(mark_bit)) { |
| Marking::WhiteToBlack(mark_bit); |
| - MemoryChunk::IncrementLiveBytesFromGC(obj, obj->Size()); |
| DCHECK(obj->GetIsolate()->heap()->Contains(obj)); |
| - marking_deque_.PushBlack(obj); |
| + PushBlack(obj); |
| } |
| } |