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

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

Issue 2865013: Heap profiler: perform a GC round before taking a snapshot (Closed)
Patch Set: Created 10 years, 6 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/heap-profiler.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 33477acfa2518efdbedb7bbb4840361d8a90c30f..7f1e3d80629f541366d5ba1811a7176a7652076b 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -431,21 +431,8 @@ class NamedEntriesDetector {
static const v8::HeapGraphNode* GetGlobalObject(
const v8::HeapSnapshot* snapshot) {
- if (i::Snapshot::IsEnabled()) {
- // In case if snapshots are enabled, there will present a
- // vanilla deserealized global object, without properties
- // added by the test code.
- CHECK_EQ(2, snapshot->GetHead()->GetChildrenCount());
- // Choose the global object of a bigger size.
- const v8::HeapGraphNode* node0 =
- snapshot->GetHead()->GetChild(0)->GetToNode();
- const v8::HeapGraphNode* node1 =
- snapshot->GetHead()->GetChild(1)->GetToNode();
- return node0->GetTotalSize() > node1->GetTotalSize() ? node0 : node1;
- } else {
- CHECK_EQ(1, snapshot->GetHead()->GetChildrenCount());
- return snapshot->GetHead()->GetChild(0)->GetToNode();
- }
+ CHECK_EQ(1, snapshot->GetHead()->GetChildrenCount());
+ return snapshot->GetHead()->GetChild(0)->GetToNode();
}
« no previous file with comments | « src/heap-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698