Index: test/cctest/test-alloc.cc |
diff --git a/test/cctest/test-alloc.cc b/test/cctest/test-alloc.cc |
index d71247c500976eb68c0ee1cc724e8a2d5b34f7bd..c20a08d3ed9c9c3314b88db32c5551faaf2a20fe 100644 |
--- a/test/cctest/test-alloc.cc |
+++ b/test/cctest/test-alloc.cc |
@@ -95,8 +95,8 @@ static Handle<Object> Test() { |
TEST(StressHandles) { |
- v8::Persistent<v8::Context> env = v8::Context::New(); |
- v8::HandleScope scope(env->GetIsolate()); |
+ v8::HandleScope scope(v8::Isolate::GetCurrent()); |
+ v8::Handle<v8::Context> env = v8::Context::New(v8::Isolate::GetCurrent()); |
env->Enter(); |
Handle<Object> o = Test(); |
CHECK(o->IsSmi() && Smi::cast(*o)->value() == 42); |
@@ -117,8 +117,8 @@ const AccessorDescriptor kDescriptor = { |
TEST(StressJS) { |
- v8::Persistent<v8::Context> env = v8::Context::New(); |
- v8::HandleScope scope(env->GetIsolate()); |
+ v8::HandleScope scope(v8::Isolate::GetCurrent()); |
+ v8::Handle<v8::Context> env = v8::Context::New(v8::Isolate::GetCurrent()); |
env->Enter(); |
Handle<JSFunction> function = |
FACTORY->NewFunction(FACTORY->function_string(), FACTORY->null_value()); |