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

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

Issue 18584007: Bugfix: AllocationSite objects need to be walkable by the heap snapshot (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit fixin' 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 | « src/heap-snapshot-generator.h ('k') | 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 d65b8140039e43eb1e7c9d76747c54e6c3d0c1da..cb1fa4d58d2ec18148c15736a42abb853a72dc7b 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -955,9 +955,10 @@ void V8HeapExplorer::ExtractReferences(HeapObject* obj) {
ExtractCellReferences(entry, Cell::cast(obj));
extract_indexed_refs = false;
} else if (obj->IsPropertyCell()) {
- ExtractPropertyCellReferences(
- entry, PropertyCell::cast(obj));
+ 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);
@@ -1264,6 +1265,13 @@ void V8HeapExplorer::ExtractPropertyCellReferences(int entry,
}
+void V8HeapExplorer::ExtractAllocationSiteReferences(int entry,
+ AllocationSite* site) {
+ SetInternalReference(site, entry, "transition_info", site->transition_info(),
+ AllocationSite::kTransitionInfoOffset);
+}
+
+
void V8HeapExplorer::ExtractClosureReferences(JSObject* js_obj, int entry) {
if (!js_obj->IsJSFunction()) return;
« no previous file with comments | « src/heap-snapshot-generator.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698