Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 5c2d5786099bff15cd894eea21f08693bd4dc0cf..c7956a3d5dad46a3efac69cb8b0b432c2576deeb 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -3090,6 +3090,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; |