| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 if (UNLIKELY(ec)) | 397 if (UNLIKELY(ec)) |
| 398 return setDOMException(ec, args.GetIsolate()); | 398 return setDOMException(ec, args.GetIsolate()); |
| 399 return v8Undefined(); | 399 return v8Undefined(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) | 402 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) |
| 403 { | 403 { |
| 404 return TestTypedefsV8Internal::methodWithExceptionMethod(args); | 404 return TestTypedefsV8Internal::methodWithExceptionMethod(args); |
| 405 } | 405 } |
| 406 | 406 |
| 407 static v8::Handle<v8::Value> constructor(const v8::Arguments& args) | 407 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 408 { | 408 { |
| 409 if (args.Length() < 2) | 409 if (args.Length() < 2) { |
| 410 return throwNotEnoughArgumentsError(args.GetIsolate()); | 410 throwNotEnoughArgumentsError(args.GetIsolate()); |
| 411 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, hello, args[0]); | 411 return; |
| 412 if (args.Length() <= 1 || !args[1]->IsFunction()) | 412 } |
| 413 return throwTypeError(0, args.GetIsolate()); | 413 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, args[0]); |
| 414 if (args.Length() <= 1 || !args[1]->IsFunction()) { |
| 415 throwTypeError(0, args.GetIsolate()); |
| 416 return; |
| 417 } |
| 414 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[1], getScrip
tExecutionContext()); | 418 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[1], getScrip
tExecutionContext()); |
| 415 | 419 |
| 416 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback); | 420 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback); |
| 417 v8::Handle<v8::Object> wrapper = args.Holder(); | 421 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 418 | 422 |
| 419 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestTypedefs::in
fo, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 423 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestTypedefs::in
fo, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
| 420 return wrapper; | 424 args.GetReturnValue().Set(wrapper); |
| 421 } | 425 } |
| 422 | 426 |
| 423 } // namespace TestTypedefsV8Internal | 427 } // namespace TestTypedefsV8Internal |
| 424 | 428 |
| 425 static const V8DOMConfiguration::BatchedAttribute V8TestTypedefsAttrs[] = { | 429 static const V8DOMConfiguration::BatchedAttribute V8TestTypedefsAttrs[] = { |
| 426 // Attribute 'unsignedLongLongAttr' (Type: 'attribute' ExtAttr: '') | 430 // Attribute 'unsignedLongLongAttr' (Type: 'attribute' ExtAttr: '') |
| 427 {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttrGet
terCallback, TestTypedefsV8Internal::unsignedLongLongAttrAttrSetterCallback, 0,
0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}, | 431 {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttrGet
terCallback, TestTypedefsV8Internal::unsignedLongLongAttrAttrSetterCallback, 0,
0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:
:PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 428 // Attribute 'immutableSerializedScriptValue' (Type: 'attribute' ExtAttr: 'I
mmutable') | 432 // Attribute 'immutableSerializedScriptValue' (Type: 'attribute' ExtAttr: 'I
mmutable') |
| 429 {"immutableSerializedScriptValue", TestTypedefsV8Internal::immutableSerializ
edScriptValueAttrGetterCallback, TestTypedefsV8Internal::immutableSerializedScri
ptValueAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>
(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */
}, | 433 {"immutableSerializedScriptValue", TestTypedefsV8Internal::immutableSerializ
edScriptValueAttrGetterCallback, TestTypedefsV8Internal::immutableSerializedScri
ptValueAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>
(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */
}, |
| 430 // Attribute 'TestSubObj' (Type: 'attribute' ExtAttr: '') | 434 // Attribute 'TestSubObj' (Type: 'attribute' ExtAttr: '') |
| (...skipping 13 matching lines...) Expand all Loading... |
| 444 {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback, 0, 3}, | 448 {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback, 0, 3}, |
| 445 {"methodWithSequenceArg", TestTypedefsV8Internal::methodWithSequenceArgMetho
dCallback, 0, 1}, | 449 {"methodWithSequenceArg", TestTypedefsV8Internal::methodWithSequenceArgMetho
dCallback, 0, 1}, |
| 446 {"nullableArrayArg", TestTypedefsV8Internal::nullableArrayArgMethodCallback,
0, 1}, | 450 {"nullableArrayArg", TestTypedefsV8Internal::nullableArrayArgMethodCallback,
0, 1}, |
| 447 {"funcWithClamp", TestTypedefsV8Internal::funcWithClampMethodCallback, 0, 1}
, | 451 {"funcWithClamp", TestTypedefsV8Internal::funcWithClampMethodCallback, 0, 1}
, |
| 448 {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMet
hodCallback, 0, 0}, | 452 {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMet
hodCallback, 0, 0}, |
| 449 {"stringArrayFunction", TestTypedefsV8Internal::stringArrayFunctionMethodCal
lback, 0, 1}, | 453 {"stringArrayFunction", TestTypedefsV8Internal::stringArrayFunctionMethodCal
lback, 0, 1}, |
| 450 {"stringArrayFunction2", TestTypedefsV8Internal::stringArrayFunction2MethodC
allback, 0, 1}, | 454 {"stringArrayFunction2", TestTypedefsV8Internal::stringArrayFunction2MethodC
allback, 0, 1}, |
| 451 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal
lback, 0, 0}, | 455 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal
lback, 0, 0}, |
| 452 }; | 456 }; |
| 453 | 457 |
| 454 v8::Handle<v8::Value> V8TestTypedefs::constructorCallback(const v8::Arguments& a
rgs) | 458 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& args) |
| 455 { | 459 { |
| 456 if (!args.IsConstructCall()) | 460 if (!args.IsConstructCall()) { |
| 457 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); | 461 throwTypeError("DOM object constructor cannot be called as a function.",
args.GetIsolate()); |
| 462 return; |
| 463 } |
| 458 | 464 |
| 459 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) | 465 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 460 return args.Holder(); | 466 args.GetReturnValue().Set(args.Holder()); |
| 467 return; |
| 468 } |
| 461 | 469 |
| 462 return TestTypedefsV8Internal::constructor(args); | 470 TestTypedefsV8Internal::constructor(args); |
| 463 } | 471 } |
| 464 | 472 |
| 465 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestTypedefsTemplate(v8::
Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType cu
rrentWorldType) | 473 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestTypedefsTemplate(v8::
Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType cu
rrentWorldType) |
| 466 { | 474 { |
| 467 desc->ReadOnlyPrototype(); | 475 desc->ReadOnlyPrototype(); |
| 468 | 476 |
| 469 v8::Local<v8::Signature> defaultSignature; | 477 v8::Local<v8::Signature> defaultSignature; |
| 470 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestTypedefs
", v8::Persistent<v8::FunctionTemplate>(), V8TestTypedefs::internalFieldCount, | 478 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestTypedefs
", v8::Persistent<v8::FunctionTemplate>(), V8TestTypedefs::internalFieldCount, |
| 471 V8TestTypedefsAttrs, WTF_ARRAY_LENGTH(V8TestTypedefsAttrs), | 479 V8TestTypedefsAttrs, WTF_ARRAY_LENGTH(V8TestTypedefsAttrs), |
| 472 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), isolate,
currentWorldType); | 480 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), isolate,
currentWorldType); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 installPerContextProperties(wrapper, impl.get(), isolate); | 530 installPerContextProperties(wrapper, impl.get(), isolate); |
| 523 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); | 531 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); |
| 524 return wrapper; | 532 return wrapper; |
| 525 } | 533 } |
| 526 void V8TestTypedefs::derefObject(void* object) | 534 void V8TestTypedefs::derefObject(void* object) |
| 527 { | 535 { |
| 528 static_cast<TestTypedefs*>(object)->deref(); | 536 static_cast<TestTypedefs*>(object)->deref(); |
| 529 } | 537 } |
| 530 | 538 |
| 531 } // namespace WebCore | 539 } // namespace WebCore |
| OLD | NEW |