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

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

Issue 70163002: Add explicit Isolate parameter to External::New (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | « test/cctest/test-accessors.cc ('k') | test/cctest/test-cpu-profiler.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 f33d02b729abdee20c0669ee2e0ecc46099b7966..55cdfe6a3a53f76ad61e3206096819c8a2d7ee1b 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -1306,7 +1306,8 @@ static void TestExternalPointerWrapping() {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
- v8::Handle<v8::Value> data = v8::External::New(expected_ptr);
+ v8::Handle<v8::Value> data =
+ v8::External::New(env->GetIsolate(), expected_ptr);
v8::Handle<v8::Object> obj = v8::Object::New();
obj->Set(v8_str("func"),
@@ -3119,7 +3120,7 @@ THREADED_TEST(HiddenPropertiesWithInterceptors) {
THREADED_TEST(External) {
v8::HandleScope scope(CcTest::isolate());
int x = 3;
- Local<v8::External> ext = v8::External::New(&x);
+ Local<v8::External> ext = v8::External::New(CcTest::isolate(), &x);
LocalContext env;
env->Global()->Set(v8_str("ext"), ext);
Local<Value> reext_obj = Script::Compile(v8_str("this.ext"))->Run();
@@ -3131,10 +3132,10 @@ THREADED_TEST(External) {
// Make sure unaligned pointers are wrapped properly.
char* data = i::StrDup("0123456789");
- Local<v8::Value> zero = v8::External::New(&data[0]);
- Local<v8::Value> one = v8::External::New(&data[1]);
- Local<v8::Value> two = v8::External::New(&data[2]);
- Local<v8::Value> three = v8::External::New(&data[3]);
+ Local<v8::Value> zero = v8::External::New(CcTest::isolate(), &data[0]);
+ Local<v8::Value> one = v8::External::New(CcTest::isolate(), &data[1]);
+ Local<v8::Value> two = v8::External::New(CcTest::isolate(), &data[2]);
+ Local<v8::Value> three = v8::External::New(CcTest::isolate(), &data[3]);
char* char_ptr = reinterpret_cast<char*>(v8::External::Cast(*zero)->Value());
CHECK_EQ('0', *char_ptr);
@@ -6874,7 +6875,7 @@ THREADED_TEST(WeakReference) {
Whammy* whammy = new Whammy(CcTest::isolate());
templ->SetNamedPropertyHandler(WhammyPropertyGetter,
0, 0, 0, 0,
- v8::External::New(whammy));
+ v8::External::New(CcTest::isolate(), whammy));
const char* extension_list[] = { "v8/gc" };
v8::ExtensionConfiguration extensions(1, extension_list);
v8::Handle<Context> context =
@@ -11569,9 +11570,9 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_TrivialSignature) {
v8::Handle<v8::ObjectTemplate> proto_templ = fun_templ->PrototypeTemplate();
proto_templ->Set(v8_str("method"), method_templ);
v8::Handle<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
- templ->SetNamedPropertyHandler(InterceptorCallICFastApi,
- NULL, NULL, NULL, NULL,
- v8::External::New(&interceptor_call_count));
+ templ->SetNamedPropertyHandler(
+ InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+ v8::External::New(CcTest::isolate(), &interceptor_call_count));
LocalContext context;
v8::Handle<v8::Function> fun = fun_templ->GetFunction();
GenerateSomeGarbage();
@@ -11598,9 +11599,9 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature) {
proto_templ->Set(v8_str("method"), method_templ);
fun_templ->SetHiddenPrototype(true);
v8::Handle<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
- templ->SetNamedPropertyHandler(InterceptorCallICFastApi,
- NULL, NULL, NULL, NULL,
- v8::External::New(&interceptor_call_count));
+ templ->SetNamedPropertyHandler(
+ InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+ v8::External::New(CcTest::isolate(), &interceptor_call_count));
LocalContext context;
v8::Handle<v8::Function> fun = fun_templ->GetFunction();
GenerateSomeGarbage();
@@ -11630,9 +11631,9 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss1) {
proto_templ->Set(v8_str("method"), method_templ);
fun_templ->SetHiddenPrototype(true);
v8::Handle<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
- templ->SetNamedPropertyHandler(InterceptorCallICFastApi,
- NULL, NULL, NULL, NULL,
- v8::External::New(&interceptor_call_count));
+ templ->SetNamedPropertyHandler(
+ InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+ v8::External::New(CcTest::isolate(), &interceptor_call_count));
LocalContext context;
v8::Handle<v8::Function> fun = fun_templ->GetFunction();
GenerateSomeGarbage();
@@ -11668,9 +11669,9 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss2) {
proto_templ->Set(v8_str("method"), method_templ);
fun_templ->SetHiddenPrototype(true);
v8::Handle<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
- templ->SetNamedPropertyHandler(InterceptorCallICFastApi,
- NULL, NULL, NULL, NULL,
- v8::External::New(&interceptor_call_count));
+ templ->SetNamedPropertyHandler(
+ InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+ v8::External::New(CcTest::isolate(), &interceptor_call_count));
LocalContext context;
v8::Handle<v8::Function> fun = fun_templ->GetFunction();
GenerateSomeGarbage();
@@ -11706,9 +11707,9 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss3) {
proto_templ->Set(v8_str("method"), method_templ);
fun_templ->SetHiddenPrototype(true);
v8::Handle<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
- templ->SetNamedPropertyHandler(InterceptorCallICFastApi,
- NULL, NULL, NULL, NULL,
- v8::External::New(&interceptor_call_count));
+ templ->SetNamedPropertyHandler(
+ InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+ v8::External::New(CcTest::isolate(), &interceptor_call_count));
LocalContext context;
v8::Handle<v8::Function> fun = fun_templ->GetFunction();
GenerateSomeGarbage();
@@ -11747,9 +11748,9 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_TypeError) {
proto_templ->Set(v8_str("method"), method_templ);
fun_templ->SetHiddenPrototype(true);
v8::Handle<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
- templ->SetNamedPropertyHandler(InterceptorCallICFastApi,
- NULL, NULL, NULL, NULL,
- v8::External::New(&interceptor_call_count));
+ templ->SetNamedPropertyHandler(
+ InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+ v8::External::New(CcTest::isolate(), &interceptor_call_count));
LocalContext context;
v8::Handle<v8::Function> fun = fun_templ->GetFunction();
GenerateSomeGarbage();
« no previous file with comments | « test/cctest/test-accessors.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698