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..389a058b1f396c64186baf678a5c37713bf86889 100644 |
--- a/test/cctest/test-heap-profiler.cc |
+++ b/test/cctest/test-heap-profiler.cc |
@@ -472,7 +472,7 @@ TEST(HeapSnapshotInternalReferences) { |
v8::Handle<v8::Object> global_proxy = env->Global(); |
v8::Handle<v8::Object> global = global_proxy->GetPrototype().As<v8::Object>(); |
CHECK_EQ(2, global->InternalFieldCount()); |
- v8::Local<v8::Object> obj = v8::Object::New(); |
+ v8::Local<v8::Object> obj = v8::Object::New(isolate); |
global->SetInternalField(0, v8_num(17)); |
global->SetInternalField(1, obj); |
v8::HeapProfiler* heap_profiler = isolate->GetHeapProfiler(); |
@@ -1354,7 +1354,7 @@ class GraphWithImplicitRefs { |
instance_ = this; |
isolate_ = (*env)->GetIsolate(); |
for (int i = 0; i < kObjectsCount; i++) { |
- objects_[i].Reset(isolate_, v8::Object::New()); |
+ objects_[i].Reset(isolate_, v8::Object::New(isolate_)); |
} |
(*env)->Global()->Set(v8_str("root_object"), |
v8::Local<v8::Value>::New(isolate_, objects_[0])); |
@@ -1820,7 +1820,8 @@ TEST(WeakGlobalHandle) { |
CHECK(!HasWeakGlobalHandle()); |
v8::Persistent<v8::Object>* handle = |
- new v8::Persistent<v8::Object>(env->GetIsolate(), v8::Object::New()); |
+ new v8::Persistent<v8::Object>(env->GetIsolate(), |
+ v8::Object::New(env->GetIsolate())); |
handle->SetWeak(handle, PersistentHandleCallback); |
CHECK(HasWeakGlobalHandle()); |
@@ -1994,8 +1995,9 @@ TEST(ManyLocalsInSharedContext) { |
TEST(AllocationSitesAreVisible) { |
LocalContext env; |
- v8::HandleScope scope(env->GetIsolate()); |
- v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler(); |
+ v8::Isolate* isolate = env->GetIsolate(); |
+ v8::HandleScope scope(isolate); |
+ v8::HeapProfiler* heap_profiler = isolate->GetHeapProfiler(); |
CompileRun( |
"fun = function () { var a = [3, 2, 1]; return a; }\n" |
"fun();"); |
@@ -2037,9 +2039,12 @@ TEST(AllocationSitesAreVisible) { |
transition_info->GetHeapValue()); |
// 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))); |
- CHECK_EQ(v8::Integer::New(2), array->Get(v8::Integer::New(1))); |
- CHECK_EQ(v8::Integer::New(1), array->Get(v8::Integer::New(2))); |
+ CHECK_EQ(v8::Integer::New(isolate, 3), |
+ array->Get(v8::Integer::New(isolate, 0))); |
+ CHECK_EQ(v8::Integer::New(isolate, 2), |
+ array->Get(v8::Integer::New(isolate, 1))); |
+ CHECK_EQ(v8::Integer::New(isolate, 1), |
+ array->Get(v8::Integer::New(isolate, 2))); |
} |