Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index ad6c451cbe8e985b2390f904e010386a79cc2b83..1c9be1aa49acee10fded7f9d03cee3aebfcfcc26 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3069,6 +3069,9 @@ void Heap::CreateFillerObjectAt(Address addr, int size) { |
bool Heap::CanMoveObjectStart(HeapObject* object) { |
if (!FLAG_move_object_start) return false; |
+ // Sampling heap profiler may have a reference to the object. |
+ if (isolate()->heap_profiler()->is_sampling_allocations()) return false; |
+ |
Address address = object->address(); |
if (lo_space()->Contains(object)) return false; |