Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 70e6c53d98bf40eff59f8d948c98ce5ccb675b77..c3f56ac4c52f4a184c734c8ed88f4b3501b8ef0c 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3138,9 +3138,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 { |