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

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

Issue 19267023: Do not report unessential weak references in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated tests. Created 7 years, 5 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 | test/cctest/test-heap-profiler.cc » ('j') | 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 15e0a7ccef3bf2085e28c2c6bc691ed0b44ea69d..feced9f2bf2b57b68b758e2430c1343dd64326bd 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1681,13 +1681,14 @@ void V8HeapExplorer::SetWeakReference(HeapObject* parent_obj,
int field_offset) {
ASSERT(parent_entry == GetEntry(parent_obj)->index());
HeapEntry* child_entry = GetEntry(child_obj);
- if (child_entry != NULL) {
+ if (child_entry == NULL) return;
+ if (IsEssentialObject(child_obj)) {
filler_->SetIndexedReference(HeapGraphEdge::kWeak,
parent_entry,
index,
child_entry);
- IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
}
+ IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
}
« no previous file with comments | « no previous file | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698