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

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

Issue 10702093: Fix compilation when disabling debugger support. (Closed) Base URL: ssh://dinauz.org/home/ivoire/projects/v8.git@master
Patch Set: Created 8 years, 5 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
« no previous file with comments | « src/runtime.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 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 const v8::HeapGraphNode* shared = 1556 const v8::HeapGraphNode* shared =
1557 GetProperty(fun, v8::HeapGraphEdge::kInternal, "shared"); 1557 GetProperty(fun, v8::HeapGraphEdge::kInternal, "shared");
1558 CHECK(HasWeakEdge(shared)); 1558 CHECK(HasWeakEdge(shared));
1559 } 1559 }
1560 1560
1561 1561
1562 TEST(NoDebugObjectInSnapshot) { 1562 TEST(NoDebugObjectInSnapshot) {
1563 v8::HandleScope scope; 1563 v8::HandleScope scope;
1564 LocalContext env; 1564 LocalContext env;
1565 1565
1566 #ifdef ENABLE_DEBUGGER_SUPPORT
1566 v8::internal::Isolate::Current()->debug()->Load(); 1567 v8::internal::Isolate::Current()->debug()->Load();
1568 #endif
1567 CompileRun("foo = {};"); 1569 CompileRun("foo = {};");
1568 const v8::HeapSnapshot* snapshot = 1570 const v8::HeapSnapshot* snapshot =
1569 v8::HeapProfiler::TakeSnapshot(v8_str("snapshot")); 1571 v8::HeapProfiler::TakeSnapshot(v8_str("snapshot"));
1570 const v8::HeapGraphNode* root = snapshot->GetRoot(); 1572 const v8::HeapGraphNode* root = snapshot->GetRoot();
1571 int globals_count = 0; 1573 int globals_count = 0;
1572 for (int i = 0; i < root->GetChildrenCount(); ++i) { 1574 for (int i = 0; i < root->GetChildrenCount(); ++i) {
1573 const v8::HeapGraphEdge* edge = root->GetChild(i); 1575 const v8::HeapGraphEdge* edge = root->GetChild(i);
1574 if (edge->GetType() == v8::HeapGraphEdge::kShortcut) { 1576 if (edge->GetType() == v8::HeapGraphEdge::kShortcut) {
1575 ++globals_count; 1577 ++globals_count;
1576 const v8::HeapGraphNode* global = edge->GetToNode(); 1578 const v8::HeapGraphNode* global = edge->GetToNode();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 const v8::HeapGraphNode* global_object = 1651 const v8::HeapGraphNode* global_object =
1650 GetProperty(global, v8::HeapGraphEdge::kProperty, "global_object"); 1652 GetProperty(global, v8::HeapGraphEdge::kProperty, "global_object");
1651 CHECK_NE(NULL, global_object); 1653 CHECK_NE(NULL, global_object);
1652 const v8::HeapGraphNode* properties = 1654 const v8::HeapGraphNode* properties =
1653 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "properties"); 1655 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "properties");
1654 CHECK_EQ(NULL, properties); 1656 CHECK_EQ(NULL, properties);
1655 const v8::HeapGraphNode* elements = 1657 const v8::HeapGraphNode* elements =
1656 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "elements"); 1658 GetProperty(global_object, v8::HeapGraphEdge::kInternal, "elements");
1657 CHECK_EQ(NULL, elements); 1659 CHECK_EQ(NULL, elements);
1658 } 1660 }
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698