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

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

Issue 1475953002: [stubs] A new approach to TF stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Win64 build Created 5 years 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 | « test/cctest/test-heap.cc ('k') | test/cctest/test-object-observe.cc » ('j') | 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 27a4c23bf48ea04a2bbd1dc9d57fef9f65288ab4..ae98cce298963131e2b4a9099172c2598c362c01 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -96,11 +96,10 @@ class NamedEntriesDetector {
static const v8::HeapGraphNode* GetGlobalObject(
const v8::HeapSnapshot* snapshot) {
- CHECK_EQ(3, snapshot->GetRoot()->GetChildrenCount());
- // The 0th-child is (GC Roots), 1st is code stubs context, 2nd is the user
- // root.
+ CHECK_EQ(2, snapshot->GetRoot()->GetChildrenCount());
+ // The 0th-child is (GC Roots), 1st is the user root.
const v8::HeapGraphNode* global_obj =
- snapshot->GetRoot()->GetChild(2)->GetToNode();
+ snapshot->GetRoot()->GetChild(1)->GetToNode();
CHECK_EQ(0, strncmp("Object", const_cast<i::HeapEntry*>(
reinterpret_cast<const i::HeapEntry*>(global_obj))->name(), 6));
return global_obj;
@@ -993,7 +992,7 @@ TEST(HeapSnapshotJSONSerialization) {
v8::Local<v8::String> ref_string =
CompileRun(STRING_LITERAL_FOR_TEST)->ToString(isolate);
#undef STRING_LITERAL_FOR_TEST
- CHECK_LT(0, strcmp(*v8::String::Utf8Value(ref_string),
+ CHECK_EQ(0, strcmp(*v8::String::Utf8Value(ref_string),
*v8::String::Utf8Value(string)));
}
@@ -2121,7 +2120,6 @@ TEST(NoDebugObjectInSnapshot) {
CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* root = snapshot->GetRoot();
int globals_count = 0;
- bool found = false;
for (int i = 0; i < root->GetChildrenCount(); ++i) {
const v8::HeapGraphEdge* edge = root->GetChild(i);
if (edge->GetType() == v8::HeapGraphEdge::kShortcut) {
@@ -2129,13 +2127,10 @@ TEST(NoDebugObjectInSnapshot) {
const v8::HeapGraphNode* global = edge->GetToNode();
const v8::HeapGraphNode* foo =
GetProperty(global, v8::HeapGraphEdge::kProperty, "foo");
- if (foo != nullptr) {
- found = true;
- }
+ CHECK(foo);
}
}
- CHECK_EQ(2, globals_count);
- CHECK(found);
+ CHECK_EQ(1, globals_count);
}
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/cctest/test-object-observe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698