Index: test/cctest/test-accessors.cc |
diff --git a/test/cctest/test-accessors.cc b/test/cctest/test-accessors.cc |
index 2c257ee4d67f4a49d07cc04a8ddc4df546cd570c..ba71600cd68a918460768f55df8561c4de0aefc4 100644 |
--- a/test/cctest/test-accessors.cc |
+++ b/test/cctest/test-accessors.cc |
@@ -65,11 +65,12 @@ static void handle_property(const v8::FunctionCallbackInfo<v8::Value>& info) { |
THREADED_TEST(PropertyHandler) { |
LocalContext env; |
- v8::HandleScope scope(env->GetIsolate()); |
- Local<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New(); |
+ v8::Isolate* isolate = env->GetIsolate(); |
+ v8::HandleScope scope(isolate); |
+ Local<v8::FunctionTemplate> fun_templ = v8::FunctionTemplate::New(isolate); |
fun_templ->InstanceTemplate()->SetAccessor(v8_str("foo"), handle_property); |
Local<v8::FunctionTemplate> getter_templ = |
- v8::FunctionTemplate::New(handle_property); |
+ v8::FunctionTemplate::New(isolate, handle_property); |
getter_templ->SetLength(0); |
fun_templ-> |
InstanceTemplate()->SetAccessorProperty(v8_str("bar"), getter_templ); |
@@ -120,17 +121,18 @@ THREADED_TEST(GlobalVariableAccess) { |
foo = 0; |
bar = -4; |
baz = 10; |
- v8::HandleScope scope(CcTest::isolate()); |
- v8::Handle<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(); |
+ v8::Isolate* isolate = CcTest::isolate(); |
+ v8::HandleScope scope(isolate); |
+ v8::Handle<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate); |
templ->InstanceTemplate()->SetAccessor( |
v8_str("foo"), GetIntValue, SetIntValue, |
- v8::External::New(CcTest::isolate(), &foo)); |
+ v8::External::New(isolate, &foo)); |
templ->InstanceTemplate()->SetAccessor( |
v8_str("bar"), GetIntValue, SetIntValue, |
- v8::External::New(CcTest::isolate(), &bar)); |
+ v8::External::New(isolate, &bar)); |
templ->InstanceTemplate()->SetAccessor( |
v8_str("baz"), GetIntValue, SetIntValue, |
- v8::External::New(CcTest::isolate(), &baz)); |
+ v8::External::New(isolate, &baz)); |
LocalContext env(0, templ->InstanceTemplate()); |
v8_compile("foo = (++bar) + baz")->Run(); |
CHECK_EQ(bar, -3); |
@@ -190,12 +192,13 @@ static void XSetter(const v8::FunctionCallbackInfo<v8::Value>& info) { |
THREADED_TEST(AccessorIC) { |
LocalContext context; |
- v8::HandleScope scope(context->GetIsolate()); |
+ v8::Isolate* isolate = context->GetIsolate(); |
+ v8::HandleScope scope(isolate); |
v8::Handle<v8::ObjectTemplate> obj = ObjectTemplate::New(); |
obj->SetAccessor(v8_str("x0"), XGetter, XSetter); |
obj->SetAccessorProperty(v8_str("x1"), |
- v8::FunctionTemplate::New(XGetter), |
- v8::FunctionTemplate::New(XSetter)); |
+ v8::FunctionTemplate::New(isolate, XGetter), |
+ v8::FunctionTemplate::New(isolate, XSetter)); |
x_holder = obj->NewInstance(); |
context->Global()->Set(v8_str("holder"), x_holder); |
x_receiver = v8::Object::New(); |