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

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

Issue 98633009: Delete v8::HeapGraphNode::GetHeapValue (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Deleted the method instead of deprecating it. Created 7 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 | « src/heap-snapshot-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 69c97ca8f25c4895e690e485bbc70b7005267411..8943c5db7d1b14d3db793bbf82c6a26b86dcf4ac 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -1562,7 +1562,7 @@ TEST(NodesIteration) {
}
-TEST(GetHeapValue) {
+TEST(GetHeapValueForNode) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
@@ -1572,25 +1572,26 @@ TEST(GetHeapValue) {
heap_profiler->TakeHeapSnapshot(v8_str("value"));
CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
- CHECK(global->GetHeapValue()->IsObject());
+ CHECK(heap_profiler->FindObjectById(global->GetId())->IsObject());
v8::Local<v8::Object> js_global =
env->Global()->GetPrototype().As<v8::Object>();
- CHECK(js_global == global->GetHeapValue());
+ CHECK(js_global == heap_profiler->FindObjectById(global->GetId()));
const v8::HeapGraphNode* obj = GetProperty(
global, v8::HeapGraphEdge::kProperty, "a");
- CHECK(obj->GetHeapValue()->IsObject());
+ CHECK(heap_profiler->FindObjectById(obj->GetId())->IsObject());
v8::Local<v8::Object> js_obj = js_global->Get(v8_str("a")).As<v8::Object>();
- CHECK(js_obj == obj->GetHeapValue());
+ CHECK(js_obj == heap_profiler->FindObjectById(obj->GetId()));
const v8::HeapGraphNode* s_prop =
GetProperty(obj, v8::HeapGraphEdge::kProperty, "s_prop");
v8::Local<v8::String> js_s_prop =
js_obj->Get(v8_str("s_prop")).As<v8::String>();
- CHECK(js_s_prop == s_prop->GetHeapValue());
+ CHECK(js_s_prop == heap_profiler->FindObjectById(s_prop->GetId()));
const v8::HeapGraphNode* n_prop =
GetProperty(obj, v8::HeapGraphEdge::kProperty, "n_prop");
v8::Local<v8::Number> js_n_prop =
js_obj->Get(v8_str("n_prop")).As<v8::Number>();
- CHECK(js_n_prop->NumberValue() == n_prop->GetHeapValue()->NumberValue());
+ CHECK(js_n_prop->NumberValue() ==
+ heap_profiler->FindObjectById(n_prop->GetId())->NumberValue());
}
@@ -1615,10 +1616,10 @@ TEST(GetHeapValueForDeletedObject) {
// Perform the check inside a nested local scope to avoid creating a
// reference to the object we are deleting.
v8::HandleScope scope(env->GetIsolate());
- CHECK(prop->GetHeapValue()->IsObject());
+ CHECK(heap_profiler->FindObjectById(prop->GetId())->IsObject());
}
CompileRun("delete a.p;");
- CHECK(prop->GetHeapValue()->IsUndefined());
+ CHECK(heap_profiler->FindObjectById(prop->GetId()).IsEmpty());
}
@@ -2032,9 +2033,10 @@ TEST(AllocationSitesAreVisible) {
CHECK_EQ(v8::HeapGraphNode::kArray, elements->GetType());
CHECK_EQ(v8::internal::FixedArray::SizeFor(3), elements->GetSelfSize());
- CHECK(transition_info->GetHeapValue()->IsArray());
- v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(
- transition_info->GetHeapValue());
+ v8::Handle<v8::Value> array_val =
+ heap_profiler->FindObjectById(transition_info->GetId());
+ CHECK(array_val->IsArray());
+ v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(array_val);
// Verify the array is "a" in the code above.
CHECK_EQ(3, array->Length());
CHECK_EQ(v8::Integer::New(3), array->Get(v8::Integer::New(0)));
« 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