@@ -44,19 +44,18 @@ using ::v8::Script;
4444using ::v8::Function;
4545using ::v8::Extension;
4646
47- static void handle_property (Local<String > name,
47+ static void handle_property (Local<Name > name,
4848 const v8::PropertyCallbackInfo<v8::Value>& info) {
4949 ApiTestFuzzer::Fuzz ();
5050 info.GetReturnValue ().Set (v8_num (900 ));
5151}
5252
53- static void handle_property_2 (Local<String > name,
53+ static void handle_property_2 (Local<Name > name,
5454 const v8::PropertyCallbackInfo<v8::Value>& info) {
5555 ApiTestFuzzer::Fuzz ();
5656 info.GetReturnValue ().Set (v8_num (902 ));
5757}
5858
59-
6059static void handle_property (const v8::FunctionCallbackInfo<v8::Value>& info) {
6160 ApiTestFuzzer::Fuzz ();
6261 CHECK_EQ (0 , info.Length ());
@@ -145,17 +144,14 @@ THREADED_TEST(PropertyHandler) {
145144 }
146145}
147146
148-
149- static void GetIntValue (Local<String> property,
147+ static void GetIntValue (Local<Name> property,
150148 const v8::PropertyCallbackInfo<v8::Value>& info) {
151149 ApiTestFuzzer::Fuzz ();
152150 int * value = static_cast <int *>(info.Data ().As <v8::External>()->Value ());
153151 info.GetReturnValue ().Set (v8_num (*value));
154152}
155153
156-
157- static void SetIntValue (Local<String> property,
158- Local<Value> value,
154+ static void SetIntValue (Local<Name> property, Local<Value> value,
159155 const v8::PropertyCallbackInfo<void >& info) {
160156 int * field = static_cast <int *>(info.Data ().As <v8::External>()->Value ());
161157 *field = value->Int32Value (info.GetIsolate ()->GetCurrentContext ()).FromJust ();
@@ -200,8 +196,7 @@ static void XGetter(const Info& info, int offset) {
200196 info.GetReturnValue ().Set (v8_num (x_register[offset]));
201197}
202198
203-
204- static void XGetter (Local<String> name,
199+ static void XGetter (Local<Name> name,
205200 const v8::PropertyCallbackInfo<v8::Value>& info) {
206201 v8::Isolate* isolate = info.GetIsolate ();
207202 CHECK (x_holder_global.Get (isolate)
@@ -210,7 +205,6 @@ static void XGetter(Local<String> name,
210205 XGetter (info, 0 );
211206}
212207
213-
214208static void XGetter (const v8::FunctionCallbackInfo<v8::Value>& info) {
215209 v8::Isolate* isolate = info.GetIsolate ();
216210 CHECK (x_receiver_global.Get (isolate)
@@ -235,14 +229,11 @@ static void XSetter(Local<Value> value, const Info& info, int offset) {
235229 info.GetReturnValue ().Set (v8_num (-1 ));
236230}
237231
238-
239- static void XSetter (Local<String> name,
240- Local<Value> value,
232+ static void XSetter (Local<Name> name, Local<Value> value,
241233 const v8::PropertyCallbackInfo<void >& info) {
242234 XSetter (value, info, 0 );
243235}
244236
245-
246237static void XSetter (const v8::FunctionCallbackInfo<v8::Value>& info) {
247238 CHECK_EQ (1 , info.Length ());
248239 XSetter (info[0 ], info, 1 );
@@ -299,11 +290,9 @@ THREADED_TEST(AccessorIC) {
299290 x_receiver_global.Reset ();
300291}
301292
302-
303293template <int C>
304294static void HandleAllocatingGetter (
305- Local<String> name,
306- const v8::PropertyCallbackInfo<v8::Value>& info) {
295+ Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
307296 ApiTestFuzzer::Fuzz ();
308297 for (int i = 0 ; i < C; i++) {
309298 USE (v8::String::NewFromUtf8Literal (info.GetIsolate (), " foo" ));
@@ -312,7 +301,6 @@ static void HandleAllocatingGetter(
312301 v8::String::NewFromUtf8Literal (info.GetIsolate (), " foo" ));
313302}
314303
315-
316304THREADED_TEST (HandleScopePop) {
317305 LocalContext context;
318306 v8::Isolate* isolate = context->GetIsolate ();
@@ -340,8 +328,7 @@ THREADED_TEST(HandleScopePop) {
340328}
341329
342330static void CheckAccessorArgsCorrect (
343- Local<String> name,
344- const v8::PropertyCallbackInfo<v8::Value>& info) {
331+ Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
345332 CHECK (info.GetIsolate () == CcTest::isolate ());
346333 CHECK (info.This () == info.Holder ());
347334 CHECK (info.Data ()
@@ -362,7 +349,6 @@ static void CheckAccessorArgsCorrect(
362349 info.GetReturnValue ().Set (17 );
363350}
364351
365-
366352THREADED_TEST (DirectCall) {
367353 LocalContext context;
368354 v8::Isolate* isolate = context->GetIsolate ();
@@ -383,15 +369,14 @@ THREADED_TEST(DirectCall) {
383369 }
384370}
385371
386- static void EmptyGetter (Local<String > name,
372+ static void EmptyGetter (Local<Name > name,
387373 const v8::PropertyCallbackInfo<v8::Value>& info) {
388374 CheckAccessorArgsCorrect (name, info);
389375 ApiTestFuzzer::Fuzz ();
390376 CheckAccessorArgsCorrect (name, info);
391377 info.GetReturnValue ().Set (v8::Local<v8::Value>());
392378}
393379
394-
395380THREADED_TEST (EmptyResult) {
396381 LocalContext context;
397382 v8::Isolate* isolate = context->GetIsolate ();
@@ -453,20 +438,16 @@ THREADED_TEST(NoReuseRegress) {
453438}
454439
455440static void ThrowingGetAccessor (
456- Local<String> name,
457- const v8::PropertyCallbackInfo<v8::Value>& info) {
441+ Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
458442 ApiTestFuzzer::Fuzz ();
459443 info.GetIsolate ()->ThrowException (v8_str (" g" ));
460444}
461445
462-
463- static void ThrowingSetAccessor (Local<String> name,
464- Local<Value> value,
446+ static void ThrowingSetAccessor (Local<Name> name, Local<Value> value,
465447 const v8::PropertyCallbackInfo<void >& info) {
466448 info.GetIsolate ()->ThrowException (value);
467449}
468450
469-
470451THREADED_TEST (Regress1054726) {
471452 LocalContext env;
472453 v8::Isolate* isolate = env->GetIsolate ();
@@ -507,14 +488,12 @@ THREADED_TEST(Regress1054726) {
507488 CHECK (v8_str (" 01234" )->Equals (env.local (), result).FromJust ());
508489}
509490
510-
511- static void AllocGetter (Local<String> name,
491+ static void AllocGetter (Local<Name> name,
512492 const v8::PropertyCallbackInfo<v8::Value>& info) {
513493 ApiTestFuzzer::Fuzz ();
514494 info.GetReturnValue ().Set (v8::Array::New (info.GetIsolate (), 1000 ));
515495}
516496
517-
518497THREADED_TEST (Gc) {
519498 LocalContext env;
520499 v8::Isolate* isolate = env->GetIsolate ();
@@ -536,8 +515,7 @@ THREADED_TEST(Gc) {
536515 .ToLocalChecked ();
537516}
538517
539-
540- static void StackCheck (Local<String> name,
518+ static void StackCheck (Local<Name> name,
541519 const v8::PropertyCallbackInfo<v8::Value>& info) {
542520 i::Isolate* isolate = reinterpret_cast <i::Isolate*>(info.GetIsolate ());
543521 i::StackFrameIterator iter (isolate);
@@ -550,7 +528,6 @@ static void StackCheck(Local<String> name,
550528 }
551529}
552530
553-
554531THREADED_TEST (StackIteration) {
555532 LocalContext env;
556533 v8::Isolate* isolate = env->GetIsolate ();
@@ -574,16 +551,14 @@ THREADED_TEST(StackIteration) {
574551 .ToLocalChecked ();
575552}
576553
577-
578- static void AllocateHandles (Local<String> name,
554+ static void AllocateHandles (Local<Name> name,
579555 const v8::PropertyCallbackInfo<v8::Value>& info) {
580556 for (int i = 0 ; i < i::kHandleBlockSize + 1 ; i++) {
581557 v8::Local<v8::Value>::New (info.GetIsolate (), name);
582558 }
583559 info.GetReturnValue ().Set (v8::Integer::New (info.GetIsolate (), 100 ));
584560}
585561
586-
587562THREADED_TEST (HandleScopeSegment) {
588563 // Check that we can return values past popping of handle scope
589564 // segments.
@@ -705,26 +680,23 @@ THREADED_TEST(GlobalObjectAccessor) {
705680 }
706681}
707682
708-
709- static void EmptyGetter (Local<Name> name,
710- const v8::PropertyCallbackInfo<v8::Value>& info) {
683+ static void EmptyGenericGetter (
684+ Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
711685 // The request is not intercepted so don't call ApiTestFuzzer::Fuzz() here.
712686}
713687
714-
715- static void OneProperty (Local<String> name,
688+ static void OneProperty (Local<Name> name,
716689 const v8::PropertyCallbackInfo<v8::Value>& info) {
717690 ApiTestFuzzer::Fuzz ();
718691 info.GetReturnValue ().Set (v8_num (1 ));
719692}
720693
721-
722694THREADED_TEST (Regress433458) {
723695 LocalContext env;
724696 v8::Isolate* isolate = env->GetIsolate ();
725697 v8::HandleScope scope (isolate);
726698 v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New (isolate);
727- obj->SetHandler (v8::NamedPropertyHandlerConfiguration (EmptyGetter ));
699+ obj->SetHandler (v8::NamedPropertyHandlerConfiguration (EmptyGenericGetter ));
728700 obj->SetNativeDataProperty (v8_str (" prop" ), OneProperty);
729701 CHECK (env->Global ()
730702 ->Set (env.local (), v8_str (" obj" ),
@@ -828,7 +800,7 @@ TEST(PrototypeGetterAccessCheck) {
828800 }
829801}
830802
831- static void CheckReceiver (Local<String > name,
803+ static void CheckReceiver (Local<Name > name,
832804 const v8::PropertyCallbackInfo<v8::Value>& info) {
833805 CHECK (info.This ()->IsObject ());
834806}
0 commit comments