Revision: 20490
Author:   [email protected]
Date:     Thu Apr  3 16:32:59 2014 UTC
Log:      Do not mark prototype transitions link as weak in heap snapshot.

[email protected]

Review URL: https://codereview.chromium.org/223643004
http://code.google.com/p/v8/source/detail?r=20490

Modified:
 /branches/bleeding_edge/src/heap-snapshot-generator.cc

=======================================
--- /branches/bleeding_edge/src/heap-snapshot-generator.cc Wed Apr 2 11:19:53 2014 UTC +++ /branches/bleeding_edge/src/heap-snapshot-generator.cc Thu Apr 3 16:32:59 2014 UTC
@@ -1322,8 +1322,23 @@
     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);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to