Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index f39b760402e1f05a937dbaac7d278aa277ca2855..530fb6d804d5d7eb5a4bccd380eaa40b60733ff3 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2284,6 +2284,13 @@ static void RightTrimFixedArray(Heap* heap, FixedArray* elms, int to_trim) { |
MemoryChunk::IncrementLiveBytesFromMutator(elms->address(), -size_delta); |
} |
} |
+ |
+ // The array may not be moved during GC, |
+ // and size has to be adjusted nevertheless. |
+ HeapProfiler* profiler = heap->isolate()->heap_profiler(); |
+ if (profiler->is_tracking_allocations()) { |
+ profiler->UpdateObjectSizeEvent(elms->address(), elms->Size()); |
+ } |
} |