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

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

Issue 64643008: api: add {Function,Object}Template::GetIsolate()
Patch Set: Created 7 years, 1 month 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/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-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index f33d02b729abdee20c0669ee2e0ecc46099b7966..c5932c0905db5297343d42e9f4020666df995eab 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -1015,6 +1015,7 @@ static void TestFunctionTemplateInitializer(Handler handler,
Local<v8::FunctionTemplate> fun_templ =
v8::FunctionTemplate::New(handler);
+ ASSERT_EQ(fun_templ->GetIsolate(), env->GetIsolate());
Local<Function> fun = fun_templ->GetFunction();
env->Global()->Set(v8_str("obj"), fun);
Local<Script> script = v8_compile("obj()");
@@ -1761,8 +1762,10 @@ THREADED_TEST(GlobalPrototype) {
THREADED_TEST(ObjectTemplate) {
- v8::HandleScope scope(CcTest::isolate());
+ v8::Isolate* isolate = CcTest::isolate();
+ v8::HandleScope scope(isolate);
Local<ObjectTemplate> templ1 = ObjectTemplate::New();
+ ASSERT_EQ(templ1->GetIsolate(), isolate);
templ1->Set("x", v8_num(10));
templ1->Set("y", v8_num(13));
LocalContext env;
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698