Reviewers: yurys, loislo, ulan,
Message:
ptal
Description:
Do not mark prototype transitions link as weak in heap snapshot.
Please review this at https://codereview.chromium.org/223643004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+15, -1 lines):
M src/heap-snapshot-generator.cc
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index
b23b60f3f537a699735720cfb56b96762b51a58b..f319b166d4fb70b393db093bdb7ac3b884942f4c
100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1322,8 +1322,22 @@ 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 array");
+ SetInternalReference(transitions, transitions_entry,
+ "prototype_transitions",
prototype_transitions);
+ }
+ 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.