Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 4dea51050d3f1a37e21b81ae7ea9ec53ceb4d341..45e8be9ea62487969a5dc2f7cd7e9eb5513b129d 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2037,6 +2037,9 @@ class ScavengingVisitor : public StaticVisitorBase { |
ASSERT(heap->AllowedToBeMigrated(object, OLD_POINTER_SPACE)); |
allocation = heap->old_pointer_space()->AllocateRaw(allocation_size); |
} |
+ heap->IncrementPromotedObjectsSize(object_size); |
+ } else { |
+ heap->IncrementSemiSpaceCopiedObjectSize(object_size); |
} |
HeapObject* target = HeapObject::cast(allocation.ToObjectChecked()); |
@@ -2050,7 +2053,6 @@ class ScavengingVisitor : public StaticVisitorBase { |
// buffer. |
*slot = target; |
MigrateObject(heap, object, target, object_size); |
- heap->IncrementSemiSpaceCopiedObjectSize(object_size); |
return; |
} |