Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: src/heap-snapshot-generator.cc

Issue 1109153002: Fix stale pointer issue in heap snapshot generator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index bae364cae7d197531e73f98e4eb00ffc5e118519..654cda4644f9c00f423693ca6d8e91a8b5da982c 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -2471,6 +2471,9 @@ void NativeObjectsExplorer::SetNativeRootReference(
FindOrAddGroupInfo(info->GetGroupLabel());
HeapEntry* group_entry =
filler_->FindOrAddEntry(group_info, synthetic_entries_allocator_);
+ // |FindOrAddEntry| can move and resize the entries backing store. Reload
+ // potentially-stale pointer.
+ child_entry = filler_->FindEntry(info);
filler_->SetNamedAutoIndexReference(
HeapGraphEdge::kInternal,
group_entry->index(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698