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

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

Issue 15837007: remove use of context scope with persistent argument (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-api.cc ('k') | no next file » | 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 5977f095c64c28eb0b289c769ee9b035c3d3d8a6..fbff717cdedb8660cdc824c3ccc2713fccf4945b 100644
--- a/test/cctest/test-lockers.cc
+++ b/test/cctest/test-lockers.cc
@@ -73,7 +73,9 @@ class KangarooThread : public v8::internal::Thread {
v8::Isolate::Scope isolate_scope(isolate_);
CHECK_EQ(isolate_, v8::internal::Isolate::Current());
v8::HandleScope scope(isolate_);
- v8::Context::Scope context_scope(isolate_, context_);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate_, context_);
+ v8::Context::Scope context_scope(context);
Local<Value> v = CompileRun("getValue()");
CHECK(v->IsNumber());
CHECK_EQ(30, static_cast<int>(v->NumberValue()));
@@ -82,7 +84,9 @@ class KangarooThread : public v8::internal::Thread {
v8::Locker locker(isolate_);
v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope scope(isolate_);
- v8::Context::Scope context_scope(isolate_, context_);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate_, context_);
+ v8::Context::Scope context_scope(context);
Local<Value> v = CompileRun("getValue()");
CHECK(v->IsNumber());
CHECK_EQ(30, static_cast<int>(v->NumberValue()));
@@ -352,7 +356,9 @@ class LockIsolateAndCalculateFibSharedContextThread : public JoinableThread {
v8::Locker lock(isolate_);
v8::Isolate::Scope isolate_scope(isolate_);
HandleScope handle_scope(isolate_);
- v8::Context::Scope context_scope(isolate_, context_);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate_, context_);
+ v8::Context::Scope context_scope(context);
CalcFibAndCheck();
}
private:
@@ -540,7 +546,9 @@ class LockUnlockLockThread : public JoinableThread {
{
v8::Isolate::Scope isolate_scope(isolate_);
v8::HandleScope handle_scope(isolate_);
- v8::Context::Scope context_scope(isolate_, context_);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate_, context_);
+ v8::Context::Scope context_scope(context);
CalcFibAndCheck();
}
{
@@ -553,7 +561,9 @@ class LockUnlockLockThread : public JoinableThread {
v8::HandleScope handle_scope(isolate_);
CHECK(v8::Locker::IsLocked(isolate_));
CHECK(!v8::Locker::IsLocked(CcTest::default_isolate()));
- v8::Context::Scope context_scope(isolate_, context_);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate_, context_);
+ v8::Context::Scope context_scope(context);
CalcFibAndCheck();
}
}
@@ -597,7 +607,9 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread {
v8::Locker lock1(CcTest::default_isolate());
{
v8::HandleScope handle_scope(CcTest::default_isolate());
- v8::Context::Scope context_scope(CcTest::default_isolate(), context_);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(CcTest::default_isolate(), context_);
+ v8::Context::Scope context_scope(context);
CalcFibAndCheck();
}
{
@@ -605,7 +617,9 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread {
{
v8::Locker lock2(CcTest::default_isolate());
v8::HandleScope handle_scope(CcTest::default_isolate());
- v8::Context::Scope context_scope(CcTest::default_isolate(), context_);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(CcTest::default_isolate(), context_);
+ v8::Context::Scope context_scope(context);
CalcFibAndCheck();
}
}
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698