Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: test/cctest/test-lockers.cc

Issue 14793004: deprecate Context::New which returns Persistent (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: use Reset instead of operator= Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-lockers.cc
diff --git a/test/cctest/test-lockers.cc b/test/cctest/test-lockers.cc
index 8486e21af6a1a15ba27adc9bc06e3342c2365733..ca0f0731332a2c42a195e3a27063a1aabfb8e2f5 100644
--- a/test/cctest/test-lockers.cc
+++ b/test/cctest/test-lockers.cc
@@ -622,15 +622,14 @@ TEST(LockUnlockLockDefaultIsolateMultithreaded) {
#else
const int kNThreads = 100;
#endif
- Persistent<v8::Context> context;
+ Local<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();
+ context = v8::Context::New(CcTest::default_isolate());
for (int i = 0; i < kNThreads; i++) {
- threads.Add(new LockUnlockLockDefaultIsolateThread(
- v8::Local<v8::Context>::New(CcTest::default_isolate(), context)));
+ threads.Add(new LockUnlockLockDefaultIsolateThread(context));
}
}
StartJoinAndDeleteThreads(threads);
@@ -675,9 +674,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::Persistent<v8::Context> context = v8::Context::New(&extensions);
+ v8::HandleScope handle_scope(isolate);
+ v8::Context::New(isolate, &extensions);
CHECK(i::Isolate::Current()->has_installed_extensions());
- context.Dispose(isolate);
}
isolate->Dispose();
}
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698