Index: test/cctest/test-lockers.cc |
diff --git a/test/cctest/test-lockers.cc b/test/cctest/test-lockers.cc |
index ca0f0731332a2c42a195e3a27063a1aabfb8e2f5..8486e21af6a1a15ba27adc9bc06e3342c2365733 100644 |
--- a/test/cctest/test-lockers.cc |
+++ b/test/cctest/test-lockers.cc |
@@ -622,14 +622,15 @@ TEST(LockUnlockLockDefaultIsolateMultithreaded) { |
#else |
const int kNThreads = 100; |
#endif |
- Local<v8::Context> context; |
+ Persistent<v8::Context> context; |
i::List<JoinableThread*> threads(kNThreads); |
{ |
v8::Locker locker_(CcTest::default_isolate()); |
v8::HandleScope handle_scope(CcTest::default_isolate()); |
- context = v8::Context::New(CcTest::default_isolate()); |
+ context = v8::Context::New(); |
for (int i = 0; i < kNThreads; i++) { |
- threads.Add(new LockUnlockLockDefaultIsolateThread(context)); |
+ threads.Add(new LockUnlockLockDefaultIsolateThread( |
+ v8::Local<v8::Context>::New(CcTest::default_isolate(), context))); |
} |
} |
StartJoinAndDeleteThreads(threads); |
@@ -674,9 +675,9 @@ class IsolateGenesisThread : public JoinableThread { |
v8::Isolate::Scope isolate_scope(isolate); |
CHECK(!i::Isolate::Current()->has_installed_extensions()); |
v8::ExtensionConfiguration extensions(count_, extension_names_); |
- v8::HandleScope handle_scope(isolate); |
- v8::Context::New(isolate, &extensions); |
+ v8::Persistent<v8::Context> context = v8::Context::New(&extensions); |
CHECK(i::Isolate::Current()->has_installed_extensions()); |
+ context.Dispose(isolate); |
} |
isolate->Dispose(); |
} |