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

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

Issue 19368002: Add missing links from PropertyCell to dependent_code (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 cb1fa4d58d2ec18148c15736a42abb853a72dc7b..21956412b1e888e884a61d518d33527adef43ed9 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -930,7 +930,6 @@ void V8HeapExplorer::ExtractReferences(HeapObject* obj) {
if (heap_entry == NULL) return; // No interest in this object.
int entry = heap_entry->index();
- bool extract_indexed_refs = true;
if (obj->IsJSGlobalProxy()) {
ExtractJSGlobalProxyReferences(entry, JSGlobalProxy::cast(obj));
} else if (obj->IsJSObject()) {
@@ -953,18 +952,17 @@ void V8HeapExplorer::ExtractReferences(HeapObject* obj) {
ExtractCodeReferences(entry, Code::cast(obj));
} else if (obj->IsCell()) {
ExtractCellReferences(entry, Cell::cast(obj));
- extract_indexed_refs = false;
} else if (obj->IsPropertyCell()) {
ExtractPropertyCellReferences(entry, PropertyCell::cast(obj));
- extract_indexed_refs = false;
} else if (obj->IsAllocationSite()) {
ExtractAllocationSiteReferences(entry, AllocationSite::cast(obj));
}
- if (extract_indexed_refs) {
- SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset);
- IndexedReferencesExtractor refs_extractor(this, obj, entry);
- obj->Iterate(&refs_extractor);
- }
+ SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset);
+
+ // Extract unvisited fields as hidden references and restore tags
+ // of visited fields.
+ IndexedReferencesExtractor refs_extractor(this, obj, entry);
+ obj->Iterate(&refs_extractor);
}
@@ -1254,14 +1252,17 @@ void V8HeapExplorer::ExtractCodeReferences(int entry, Code* code) {
void V8HeapExplorer::ExtractCellReferences(int entry, Cell* cell) {
- SetInternalReference(cell, entry, "value", cell->value());
+ SetInternalReference(cell, entry, "value", cell->value(), Cell::kValueOffset);
}
void V8HeapExplorer::ExtractPropertyCellReferences(int entry,
PropertyCell* cell) {
- SetInternalReference(cell, entry, "value", cell->value());
- SetInternalReference(cell, entry, "type", cell->type());
+ ExtractCellReferences(entry, cell);
+ SetInternalReference(cell, entry, "type", cell->type(),
+ PropertyCell::kTypeOffset);
+ SetInternalReference(cell, entry, "dependent_code", cell->dependent_code(),
+ PropertyCell::kDependentCodeOffset);
}
« 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