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

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

Issue 15038002: Revert "deprecate Context::New which returns Persistent" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 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();
}
« 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