[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}
This commit is contained in:
ofrobots 2016-05-04 02:58:15 -07:00 committed by Commit bot
parent 07c72af0d7
commit 9622696b5e

View File

@ -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(