Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: test/cctest/test-heap-profiler.cc

Issue 10162005: Eliminate internal and hidden links to oddballs and other non-essential objects in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/profile-generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+}
« no previous file with comments | « src/profile-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698