Commit f7249cd9 authored by alph's avatar alph Committed by Commit bot

Do not mark dependent_code arrays as weak in heap snapshot.

Review-Url: https://codereview.chromium.org/2197393003
Cr-Commit-Position: refs/heads/master@{#38251}
parent a4743bae
......@@ -1319,7 +1319,6 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
Map::kConstructorOrBackPointerOffset);
}
TagObject(map->dependent_code(), "(dependent code)");
MarkAsWeakContainer(map->dependent_code());
SetInternalReference(map, entry, "dependent_code", map->dependent_code(),
Map::kDependentCodeOffset);
TagObject(map->weak_cell_cache(), "(weak cell)");
......@@ -1495,7 +1494,7 @@ void V8HeapExplorer::ExtractPropertyCellReferences(int entry,
PropertyCell* cell) {
SetInternalReference(cell, entry, "value", cell->value(),
PropertyCell::kValueOffset);
MarkAsWeakContainer(cell->dependent_code());
TagObject(cell->dependent_code(), "(dependent code)");
SetInternalReference(cell, entry, "dependent_code", cell->dependent_code(),
PropertyCell::kDependentCodeOffset);
}
......@@ -1507,7 +1506,7 @@ void V8HeapExplorer::ExtractAllocationSiteReferences(int entry,
AllocationSite::kTransitionInfoOffset);
SetInternalReference(site, entry, "nested_site", site->nested_site(),
AllocationSite::kNestedSiteOffset);
MarkAsWeakContainer(site->dependent_code());
TagObject(site->dependent_code(), "(dependent code)");
SetInternalReference(site, entry, "dependent_code", site->dependent_code(),
AllocationSite::kDependentCodeOffset);
// Do not visit weak_next as it is not visited by the StaticVisitor,
......
......@@ -2824,7 +2824,7 @@ TEST(WeakContainers) {
CHECK_NE(0, count);
for (int i = 0; i < count; ++i) {
const v8::HeapGraphEdge* prop = dependent_code->GetChild(i);
CHECK_EQ(v8::HeapGraphEdge::kWeak, prop->GetType());
CHECK_EQ(v8::HeapGraphEdge::kInternal, prop->GetType());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment