Index: src/profiler/sampling-heap-profiler.cc |
diff --git a/src/profiler/sampling-heap-profiler.cc b/src/profiler/sampling-heap-profiler.cc |
index be691fdb515dbb32e1342b10b34221f6cb7f788d..5da784bebeafc18274788f661d1f32ad6fad4ee0 100644 |
--- a/src/profiler/sampling-heap-profiler.cc |
+++ b/src/profiler/sampling-heap-profiler.cc |
@@ -109,6 +109,7 @@ void SamplingHeapProfiler::SampleObject(Address soon_object, size_t size) { |
Sample* sample = new Sample(size, node, loc, this); |
samples_.insert(sample); |
sample->global.SetWeak(sample, OnWeakCallback, WeakCallbackType::kParameter); |
+ sample->global.MarkIndependent(); |
} |
void SamplingHeapProfiler::OnWeakCallback( |