| Index: src/heap/incremental-marking.h
|
| diff --git a/src/heap/incremental-marking.h b/src/heap/incremental-marking.h
|
| index 7ecbf3581e1dc8b7b2d09cd7a01af2b05c69a9e7..05392c75d0309f4f0585a5ea9db789d3e30db981 100644
|
| --- a/src/heap/incremental-marking.h
|
| +++ b/src/heap/incremental-marking.h
|
| @@ -208,12 +208,17 @@ class IncrementalMarking {
|
|
|
| static void TransferMark(Heap* heap, Address old_start, Address new_start);
|
|
|
| - // Returns true if the transferred color is black.
|
| - INLINE(static bool TransferColor(HeapObject* from, HeapObject* to)) {
|
| - if (Page::FromAddress(to->address())->IsFlagSet(Page::BLACK_PAGE))
|
| - return true;
|
| + // Returns true if the color transfer requires live bytes updating.
|
| + INLINE(static bool TransferColor(HeapObject* from, HeapObject* to,
|
| + int size)) {
|
| MarkBit from_mark_bit = ObjectMarking::MarkBitFrom(from);
|
| MarkBit to_mark_bit = ObjectMarking::MarkBitFrom(to);
|
| +
|
| + if (Marking::IsBlack(to_mark_bit)) {
|
| + DCHECK(to->GetHeap()->incremental_marking()->black_allocation());
|
| + return false;
|
| + }
|
| +
|
| DCHECK(Marking::IsWhite(to_mark_bit));
|
| if (from_mark_bit.Get()) {
|
| to_mark_bit.Set();
|
|
|