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

Unified Diff: test/cctest/test-api.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 | « src/d8.cc ('k') | test/cctest/test-lockers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 9ded31ebc0634fde0bc705955df38d7c96614ac9..e52dde37c994fea3d04b3444bb5cc8a6cf8d0836 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -17327,7 +17327,9 @@ TEST(RunTwoIsolatesOnSingleThread) {
{
v8::HandleScope scope(isolate1);
- v8::Context::Scope cscope(isolate1, context1);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate1, context1);
+ v8::Context::Scope context_scope(context);
// Run something in new isolate.
CompileRun("var foo = 'isolate 1';");
ExpectString("function f() { return foo; }; f()", "isolate 1");
@@ -17341,7 +17343,9 @@ TEST(RunTwoIsolatesOnSingleThread) {
v8::Isolate::Scope iscope(isolate2);
v8::HandleScope scope(isolate2);
context2.Reset(isolate2, Context::New(isolate2));
- v8::Context::Scope cscope(isolate2, context2);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate2, context2);
+ v8::Context::Scope context_scope(context);
// Run something in new isolate.
CompileRun("var foo = 'isolate 2';");
@@ -17350,7 +17354,9 @@ TEST(RunTwoIsolatesOnSingleThread) {
{
v8::HandleScope scope(isolate1);
- v8::Context::Scope cscope(isolate1, context1);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate1, context1);
+ v8::Context::Scope context_scope(context);
// Now again in isolate 1
ExpectString("function f() { return foo; }; f()", "isolate 1");
}
@@ -17368,7 +17374,9 @@ TEST(RunTwoIsolatesOnSingleThread) {
{
v8::HandleScope scope(v8::Isolate::GetCurrent());
- v8::Context::Scope cscope(v8::Isolate::GetCurrent(), context_default);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(v8::Isolate::GetCurrent(), context_default);
+ v8::Context::Scope context_scope(context);
// Variables in other isolates should be not available, verify there
// is an exception.
ExpectTrue("function f() {"
@@ -17388,13 +17396,17 @@ TEST(RunTwoIsolatesOnSingleThread) {
{
v8::Isolate::Scope iscope(isolate2);
v8::HandleScope scope(v8::Isolate::GetCurrent());
- v8::Context::Scope cscope(isolate2, context2);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(isolate2, context2);
+ v8::Context::Scope context_scope(context);
ExpectString("function f() { return foo; }; f()", "isolate 2");
}
{
v8::HandleScope scope(v8::Isolate::GetCurrent());
- v8::Context::Scope cscope(v8::Isolate::GetCurrent(), context1);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(v8::Isolate::GetCurrent(), context1);
+ v8::Context::Scope context_scope(context);
ExpectString("function f() { return foo; }; f()", "isolate 1");
}
@@ -17420,7 +17432,9 @@ TEST(RunTwoIsolatesOnSingleThread) {
// Check that default isolate still runs.
{
v8::HandleScope scope(v8::Isolate::GetCurrent());
- v8::Context::Scope cscope(v8::Isolate::GetCurrent(), context_default);
+ v8::Local<v8::Context> context =
+ v8::Local<v8::Context>::New(v8::Isolate::GetCurrent(), context_default);
+ v8::Context::Scope context_scope(context);
ExpectTrue("function f() { return isDefaultIsolate; }; f()");
}
}
« no previous file with comments | « src/d8.cc ('k') | test/cctest/test-lockers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698