Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index afdc7bb4cd397d69625ecdca09c295a668e0a6ae..b8a9b7a50cd287b88b62fe32367b57559ec3c4d4 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3078,9 +3078,11 @@ void Heap::AdjustLiveBytes(HeapObject* object, int by, InvocationMode mode) { |
// the heap using HeapIterator, we can update the live byte count. We cannot |
// update while using HeapIterator because the iterator is temporarily |
// marking the whole object graph, without updating live bytes. |
- if (!in_heap_iterator() && |
- !mark_compact_collector()->sweeping_in_progress() && |
- Marking::IsBlack(Marking::MarkBitFrom(object->address()))) { |
+ if (lo_space()->Contains(object)) { |
+ lo_space()->AdjustLiveBytes(by); |
+ } else if (!in_heap_iterator() && |
+ !mark_compact_collector()->sweeping_in_progress() && |
+ Marking::IsBlack(Marking::MarkBitFrom(object->address()))) { |
if (mode == SEQUENTIAL_TO_SWEEPER) { |
MemoryChunk::IncrementLiveBytesFromGC(object, by); |
} else { |