Index: test/cctest/test-heap-profiler.cc |
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc |
index 64821cfbfdf6ac59e52929191a4c88e96129f601..3ac17414a022419b1d80bfe2b646a5f5359ac4c1 100644 |
--- a/test/cctest/test-heap-profiler.cc |
+++ b/test/cctest/test-heap-profiler.cc |
@@ -1645,3 +1645,22 @@ TEST(AllStrongGcRootsHaveNames) { |
CHECK(isalpha(**name)); |
} |
} |
+ |
+ |
+TEST(NoRefsToNonEssentialEntries) { |
+ v8::HandleScope scope; |
+ LocalContext env; |
+ CompileRun("global_object = {};\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, "global_object"); |
+ CHECK_NE(NULL, global_object); |
+ const v8::HeapGraphNode* properties = |
+ GetProperty(global_object, v8::HeapGraphEdge::kInternal, "properties"); |
+ CHECK_EQ(NULL, properties); |
+ const v8::HeapGraphNode* elements = |
+ GetProperty(global_object, v8::HeapGraphEdge::kInternal, "elements"); |
+ CHECK_EQ(NULL, elements); |
+} |