Commit 9622696b authored by ofrobots's avatar ofrobots Committed by Commit bot

[profiler] sampled allocations should be marked as independent

Sampling heap profiler keeps weak references. These should be marked
independent so that the weak callback can be dispatched on new space
collections.

BUG=v8:4959
LOG=N
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/1945193002
Cr-Commit-Position: refs/heads/master@{#36012}
parent 07c72af0
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment