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

Side by Side Diff: test/cctest/test-heap-profiler.cc

Issue 12320039: Fix for HeapSnapshotAddressReuse test case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: unnecessary change was removed Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // 2 //
3 // Tests for heap profiler 3 // Tests for heap profiler
4 4
5 #include <ctype.h> 5 #include <ctype.h>
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #include "cctest.h" 9 #include "cctest.h"
10 #include "hashmap.h" 10 #include "hashmap.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 CHECK_NE(NULL, array_node); 387 CHECK_NE(NULL, array_node);
388 int wrong_count = 0; 388 int wrong_count = 0;
389 for (int i = 0, count = array_node->GetChildrenCount(); i < count; ++i) { 389 for (int i = 0, count = array_node->GetChildrenCount(); i < count; ++i) {
390 const v8::HeapGraphEdge* prop = array_node->GetChild(i); 390 const v8::HeapGraphEdge* prop = array_node->GetChild(i);
391 if (prop->GetType() != v8::HeapGraphEdge::kElement) 391 if (prop->GetType() != v8::HeapGraphEdge::kElement)
392 continue; 392 continue;
393 v8::SnapshotObjectId id = prop->GetToNode()->GetId(); 393 v8::SnapshotObjectId id = prop->GetToNode()->GetId();
394 if (id < maxId1) 394 if (id < maxId1)
395 ++wrong_count; 395 ++wrong_count;
396 } 396 }
397 // FIXME: Object ids should be unique but it is not so at the moment. 397 CHECK_EQ(0, wrong_count);
398 CHECK_NE(0, wrong_count);
399 } 398 }
400 399
401 400
402 TEST(HeapEntryIdsAndArrayShift) { 401 TEST(HeapEntryIdsAndArrayShift) {
403 v8::HandleScope scope; 402 v8::HandleScope scope;
404 LocalContext env; 403 LocalContext env;
405 404
406 CompileRun( 405 CompileRun(
407 "function AnObject() {\n" 406 "function AnObject() {\n"
408 " this.first = 'first';\n" 407 " this.first = 'first';\n"
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 const v8::HeapGraphNode* map = 1694 const v8::HeapGraphNode* map =
1696 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "map"); 1695 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "map");
1697 CHECK_NE(NULL, map); 1696 CHECK_NE(NULL, map);
1698 const v8::HeapGraphNode* own_descriptors = GetProperty( 1697 const v8::HeapGraphNode* own_descriptors = GetProperty(
1699 map, v8::HeapGraphEdge::kInternal, "descriptors"); 1698 map, v8::HeapGraphEdge::kInternal, "descriptors");
1700 CHECK_NE(NULL, own_descriptors); 1699 CHECK_NE(NULL, own_descriptors);
1701 const v8::HeapGraphNode* own_transitions = GetProperty( 1700 const v8::HeapGraphNode* own_transitions = GetProperty(
1702 map, v8::HeapGraphEdge::kInternal, "transitions"); 1701 map, v8::HeapGraphEdge::kInternal, "transitions");
1703 CHECK_EQ(NULL, own_transitions); 1702 CHECK_EQ(NULL, own_transitions);
1704 } 1703 }
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698