| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 | 4 |
| 5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
| 9 | 9 |
| 10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 static void TestTypedefsReplaceableAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 260 static void TestTypedefsReplaceableAttributeSetterCallback(v8::Local<v8::String>
name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 261 { | 261 { |
| 262 TestTypedefsV8Internal::TestTypedefsReplaceableAttributeSetter(name, jsValue
, info); | 262 TestTypedefsV8Internal::TestTypedefsReplaceableAttributeSetter(name, jsValue
, info); |
| 263 } | 263 } |
| 264 | 264 |
| 265 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& args) | 265 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 266 { | 266 { |
| 267 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 267 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 268 if (UNLIKELY(args.Length() <= 0)) { | 268 if (UNLIKELY(args.Length() <= 0)) { |
| 269 imp->func(); | 269 imp->func(); |
| 270 | |
| 271 return; | 270 return; |
| 272 } | 271 } |
| 273 V8TRYCATCH_VOID(Vector<int>, x, toNativeArray<int>(args[0], 1, args.GetIsola
te())); | 272 V8TRYCATCH_VOID(Vector<int>, x, toNativeArray<int>(args[0], 1, args.GetIsola
te())); |
| 274 imp->func(x); | 273 imp->func(x); |
| 275 | |
| 276 return; | 274 return; |
| 277 } | 275 } |
| 278 | 276 |
| 279 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) | 277 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 280 { | 278 { |
| 281 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 282 TestTypedefsV8Internal::funcMethod(args); | 280 TestTypedefsV8Internal::funcMethod(args); |
| 283 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 284 } | 282 } |
| 285 | 283 |
| 286 static void setShadowMethod(const v8::FunctionCallbackInfo<v8::Value>& args) | 284 static void setShadowMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 287 { | 285 { |
| 288 if (UNLIKELY(args.Length() < 3)) { | 286 if (UNLIKELY(args.Length() < 3)) { |
| 289 throwTypeError(ExceptionMessages::failedToExecute("setShadow", "TestType
defs", ExceptionMessages::notEnoughArguments(3, args.Length())), args.GetIsolate
()); | 287 throwTypeError(ExceptionMessages::failedToExecute("setShadow", "TestType
defs", ExceptionMessages::notEnoughArguments(3, args.Length())), args.GetIsolate
()); |
| 290 return; | 288 return; |
| 291 } | 289 } |
| 292 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 290 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 293 V8TRYCATCH_VOID(float, width, static_cast<float>(args[0]->NumberValue())); | 291 V8TRYCATCH_VOID(float, width, static_cast<float>(args[0]->NumberValue())); |
| 294 V8TRYCATCH_VOID(float, height, static_cast<float>(args[1]->NumberValue())); | 292 V8TRYCATCH_VOID(float, height, static_cast<float>(args[1]->NumberValue())); |
| 295 V8TRYCATCH_VOID(float, blur, static_cast<float>(args[2]->NumberValue())); | 293 V8TRYCATCH_VOID(float, blur, static_cast<float>(args[2]->NumberValue())); |
| 296 if (UNLIKELY(args.Length() <= 3)) { | 294 if (UNLIKELY(args.Length() <= 3)) { |
| 297 imp->setShadow(width, height, blur); | 295 imp->setShadow(width, height, blur); |
| 298 | |
| 299 return; | 296 return; |
| 300 } | 297 } |
| 301 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, color, args[3]); | 298 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, color, args[3]); |
| 302 if (UNLIKELY(args.Length() <= 4)) { | 299 if (UNLIKELY(args.Length() <= 4)) { |
| 303 imp->setShadow(width, height, blur, color); | 300 imp->setShadow(width, height, blur, color); |
| 304 | |
| 305 return; | 301 return; |
| 306 } | 302 } |
| 307 V8TRYCATCH_VOID(float, alpha, static_cast<float>(args[4]->NumberValue())); | 303 V8TRYCATCH_VOID(float, alpha, static_cast<float>(args[4]->NumberValue())); |
| 308 imp->setShadow(width, height, blur, color, alpha); | 304 imp->setShadow(width, height, blur, color, alpha); |
| 309 | |
| 310 return; | 305 return; |
| 311 } | 306 } |
| 312 | 307 |
| 313 static void setShadowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) | 308 static void setShadowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a
rgs) |
| 314 { | 309 { |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 310 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 316 TestTypedefsV8Internal::setShadowMethod(args); | 311 TestTypedefsV8Internal::setShadowMethod(args); |
| 317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 312 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 318 } | 313 } |
| 319 | 314 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 339 static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) | 334 static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& ar
gs) |
| 340 { | 335 { |
| 341 if (UNLIKELY(args.Length() < 1)) { | 336 if (UNLIKELY(args.Length() < 1)) { |
| 342 throwTypeError(ExceptionMessages::failedToExecute("nullableArrayArg", "T
estTypedefs", ExceptionMessages::notEnoughArguments(1, args.Length())), args.Get
Isolate()); | 337 throwTypeError(ExceptionMessages::failedToExecute("nullableArrayArg", "T
estTypedefs", ExceptionMessages::notEnoughArguments(1, args.Length())), args.Get
Isolate()); |
| 343 return; | 338 return; |
| 344 } | 339 } |
| 345 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 340 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 346 bool arrayArgIsNull = args[0]->IsNull(); | 341 bool arrayArgIsNull = args[0]->IsNull(); |
| 347 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], 1,
args.GetIsolate())); | 342 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0], 1,
args.GetIsolate())); |
| 348 imp->nullableArrayArg(arrayArgIsNull ? 0 : &arrayArg); | 343 imp->nullableArrayArg(arrayArgIsNull ? 0 : &arrayArg); |
| 349 | |
| 350 return; | 344 return; |
| 351 } | 345 } |
| 352 | 346 |
| 353 static void nullableArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& args) | 347 static void nullableArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& args) |
| 354 { | 348 { |
| 355 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 349 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 356 TestTypedefsV8Internal::nullableArrayArgMethod(args); | 350 TestTypedefsV8Internal::nullableArrayArgMethod(args); |
| 357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 351 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 358 } | 352 } |
| 359 | 353 |
| 360 static void funcWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>& args) | 354 static void funcWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 361 { | 355 { |
| 362 if (UNLIKELY(args.Length() < 1)) { | 356 if (UNLIKELY(args.Length() < 1)) { |
| 363 throwTypeError(ExceptionMessages::failedToExecute("funcWithClamp", "Test
Typedefs", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIso
late()); | 357 throwTypeError(ExceptionMessages::failedToExecute("funcWithClamp", "Test
Typedefs", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIso
late()); |
| 364 return; | 358 return; |
| 365 } | 359 } |
| 366 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 360 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 367 unsigned long long arg1 = 0; | 361 unsigned long long arg1 = 0; |
| 368 V8TRYCATCH_VOID(double, arg1NativeValue, args[0]->NumberValue()); | 362 V8TRYCATCH_VOID(double, arg1NativeValue, args[0]->NumberValue()); |
| 369 if (!std::isnan(arg1NativeValue)) | 363 if (!std::isnan(arg1NativeValue)) |
| 370 arg1 = clampTo<unsigned long long>(arg1NativeValue); | 364 arg1 = clampTo<unsigned long long>(arg1NativeValue); |
| 371 if (UNLIKELY(args.Length() <= 1)) { | 365 if (UNLIKELY(args.Length() <= 1)) { |
| 372 imp->funcWithClamp(arg1); | 366 imp->funcWithClamp(arg1); |
| 373 | |
| 374 return; | 367 return; |
| 375 } | 368 } |
| 376 unsigned long long arg2 = 0; | 369 unsigned long long arg2 = 0; |
| 377 V8TRYCATCH_VOID(double, arg2NativeValue, args[1]->NumberValue()); | 370 V8TRYCATCH_VOID(double, arg2NativeValue, args[1]->NumberValue()); |
| 378 if (!std::isnan(arg2NativeValue)) | 371 if (!std::isnan(arg2NativeValue)) |
| 379 arg2 = clampTo<unsigned long long>(arg2NativeValue); | 372 arg2 = clampTo<unsigned long long>(arg2NativeValue); |
| 380 imp->funcWithClamp(arg1, arg2); | 373 imp->funcWithClamp(arg1, arg2); |
| 381 | |
| 382 return; | 374 return; |
| 383 } | 375 } |
| 384 | 376 |
| 385 static void funcWithClampMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& args) | 377 static void funcWithClampMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& args) |
| 386 { | 378 { |
| 387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 379 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 388 TestTypedefsV8Internal::funcWithClampMethod(args); | 380 TestTypedefsV8Internal::funcWithClampMethod(args); |
| 389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 381 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 390 } | 382 } |
| 391 | 383 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 450 } | 442 } |
| 451 | 443 |
| 452 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) | 444 static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>&
args) |
| 453 { | 445 { |
| 454 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 446 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 455 ExceptionState es(args.GetIsolate()); | 447 ExceptionState es(args.GetIsolate()); |
| 456 imp->methodWithException(es); | 448 imp->methodWithException(es); |
| 457 if (es.throwIfNeeded()) | 449 if (es.throwIfNeeded()) |
| 458 return; | 450 return; |
| 459 | |
| 460 return; | 451 return; |
| 461 } | 452 } |
| 462 | 453 |
| 463 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& args) | 454 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& args) |
| 464 { | 455 { |
| 465 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 466 TestTypedefsV8Internal::methodWithExceptionMethod(args); | 457 TestTypedefsV8Internal::methodWithExceptionMethod(args); |
| 467 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 468 } | 459 } |
| 469 | 460 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeI
nfo, wrapper, isolate, WrapperConfiguration::Independent); | 585 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl, &wrapperTypeI
nfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 595 return wrapper; | 586 return wrapper; |
| 596 } | 587 } |
| 597 | 588 |
| 598 void V8TestTypedefs::derefObject(void* object) | 589 void V8TestTypedefs::derefObject(void* object) |
| 599 { | 590 { |
| 600 fromInternalPointer(object)->deref(); | 591 fromInternalPointer(object)->deref(); |
| 601 } | 592 } |
| 602 | 593 |
| 603 } // namespace WebCore | 594 } // namespace WebCore |
| OLD | NEW |