Index: test/cctest/test-heap-profiler.cc |
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc |
index 3e03ae96a7694f879a8181d5cc906221219dffc7..1be64d91061ed427d6103f906494adf8c6483956 100644 |
--- a/test/cctest/test-heap-profiler.cc |
+++ b/test/cctest/test-heap-profiler.cc |
@@ -1658,3 +1658,25 @@ TEST(NoRefsToNonEssentialEntries) { |
GetProperty(global_object, v8::HeapGraphEdge::kInternal, "elements"); |
CHECK_EQ(NULL, elements); |
} |
+ |
+ |
+TEST(MapHasDescriptorsAndTransitions) { |
+ v8::HandleScope scope; |
+ LocalContext env; |
+ CompileRun("obj = { a: 10 };\n"); |
+ const v8::HeapSnapshot* snapshot = |
+ v8::HeapProfiler::TakeSnapshot(v8_str("snapshot")); |
+ const v8::HeapGraphNode* global = GetGlobalObject(snapshot); |
+ const v8::HeapGraphNode* global_object = |
+ GetProperty(global, v8::HeapGraphEdge::kProperty, "obj"); |
+ CHECK_NE(NULL, global_object); |
+ const v8::HeapGraphNode* map = |
+ GetProperty(global_object, v8::HeapGraphEdge::kInternal, "map"); |
+ CHECK_NE(NULL, map); |
+ const v8::HeapGraphNode* descriptors = |
+ GetProperty(map, v8::HeapGraphEdge::kInternal, "descriptors"); |
+ CHECK_NE(NULL, descriptors); |
+ const v8::HeapGraphNode* transitions = |
+ GetProperty(map, v8::HeapGraphEdge::kInternal, "transitions"); |
+ CHECK_NE(NULL, transitions); |
+} |