Index: src/heap-snapshot-generator.cc |
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc |
index b23b60f3f537a699735720cfb56b96762b51a58b..8410ba301e75a2bcc693f0f112f03f1fbbe77a96 100644 |
--- a/src/heap-snapshot-generator.cc |
+++ b/src/heap-snapshot-generator.cc |
@@ -1322,8 +1322,23 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) { |
TagObject(back_pointer, "(back pointer)"); |
SetInternalReference(transitions, transitions_entry, |
"back_pointer", back_pointer); |
+ |
+ if (FLAG_collect_maps && map->CanTransition()) { |
+ if (!transitions->IsSimpleTransition()) { |
+ if (transitions->HasPrototypeTransitions()) { |
+ FixedArray* prototype_transitions = |
+ transitions->GetPrototypeTransitions(); |
+ MarkAsWeakContainer(prototype_transitions); |
+ TagObject(prototype_transitions, "(prototype transitions"); |
+ SetInternalReference(transitions, transitions_entry, |
+ "prototype_transitions", prototype_transitions); |
+ } |
+ // TODO(alph): transitions keys are strong links. |
+ MarkAsWeakContainer(transitions); |
+ } |
+ } |
+ |
TagObject(transitions, "(transition array)"); |
- MarkAsWeakContainer(transitions); |
SetInternalReference(map, entry, |
"transitions", transitions, |
Map::kTransitionsOrBackPointerOffset); |