| Index: test/cctest/test-heap-profiler.cc
|
| diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
|
| index 8943c5db7d1b14d3db793bbf82c6a26b86dcf4ac..8a02399fee09f0a644255efd5605ac507e7b37af 100644
|
| --- a/test/cctest/test-heap-profiler.cc
|
| +++ b/test/cctest/test-heap-profiler.cc
|
| @@ -423,7 +423,8 @@ TEST(HeapSnapshotSlicedString) {
|
| TEST(HeapSnapshotConsString) {
|
| v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope scope(isolate);
|
| - v8::Local<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
|
| + v8::Local<v8::ObjectTemplate> global_template =
|
| + v8::ObjectTemplate::New(isolate);
|
| global_template->SetInternalFieldCount(1);
|
| LocalContext env(NULL, global_template);
|
| v8::Handle<v8::Object> global_proxy = env->Global();
|
| @@ -466,13 +467,14 @@ TEST(HeapSnapshotConsString) {
|
| TEST(HeapSnapshotInternalReferences) {
|
| v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope scope(isolate);
|
| - v8::Local<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
|
| + v8::Local<v8::ObjectTemplate> global_template =
|
| + v8::ObjectTemplate::New(isolate);
|
| global_template->SetInternalFieldCount(2);
|
| LocalContext env(NULL, global_template);
|
| 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 +1356,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]));
|
| @@ -1821,7 +1823,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());
|
| @@ -1995,8 +1998,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();");
|
| @@ -2039,9 +2043,12 @@ TEST(AllocationSitesAreVisible) {
|
| 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)));
|
| - 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)));
|
| }
|
|
|
|
|
|
|