| 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 13 matching lines...) Expand all Loading... |
| 24 #include "RuntimeEnabledFeatures.h" | 24 #include "RuntimeEnabledFeatures.h" |
| 25 #include "SerializedScriptValue.h" | 25 #include "SerializedScriptValue.h" |
| 26 #include "V8DOMStringList.h" | 26 #include "V8DOMStringList.h" |
| 27 #include "V8SVGPoint.h" | 27 #include "V8SVGPoint.h" |
| 28 #include "V8SerializedScriptValue.h" | 28 #include "V8SerializedScriptValue.h" |
| 29 #include "V8TestCallback.h" | 29 #include "V8TestCallback.h" |
| 30 #include "V8TestSubObj.h" | 30 #include "V8TestSubObj.h" |
| 31 #include "bindings/v8/ScriptController.h" | 31 #include "bindings/v8/ScriptController.h" |
| 32 #include "bindings/v8/SerializedScriptValue.h" | 32 #include "bindings/v8/SerializedScriptValue.h" |
| 33 #include "bindings/v8/V8Binding.h" | 33 #include "bindings/v8/V8Binding.h" |
| 34 #include "bindings/v8/V8DOMConfiguration.h" |
| 34 #include "bindings/v8/V8DOMWrapper.h" | 35 #include "bindings/v8/V8DOMWrapper.h" |
| 36 #include "bindings/v8/V8ObjectConstructor.h" |
| 35 #include "core/dom/ContextFeatures.h" | 37 #include "core/dom/ContextFeatures.h" |
| 36 #include "core/dom/DOMStringList.h" | 38 #include "core/dom/DOMStringList.h" |
| 39 #include "core/dom/Document.h" |
| 37 #include "core/dom/ExceptionCode.h" | 40 #include "core/dom/ExceptionCode.h" |
| 38 #include "core/page/Frame.h" | 41 #include "core/page/Frame.h" |
| 39 #include "core/svg/properties/SVGPropertyTearOff.h" | 42 #include "core/svg/properties/SVGPropertyTearOff.h" |
| 40 #include "wtf/UnusedParam.h" | 43 #include "wtf/UnusedParam.h" |
| 41 | 44 |
| 42 #if ENABLE(BINDING_INTEGRITY) | 45 #if ENABLE(BINDING_INTEGRITY) |
| 43 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
| 44 #pragma warning(disable: 4483) | 47 #pragma warning(disable: 4483) |
| 45 extern "C" { extern void (*const __identifier("??_7TestTypedefs@WebCore@@6B@")[]
)(); } | 48 extern "C" { extern void (*const __identifier("??_7TestTypedefs@WebCore@@6B@")[]
)(); } |
| 46 #else | 49 #else |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 return TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter(name, value
, info); | 275 return TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter(name, value
, info); |
| 273 } | 276 } |
| 274 | 277 |
| 275 static v8::Handle<v8::Value> funcMethod(const v8::Arguments& args) | 278 static v8::Handle<v8::Value> funcMethod(const v8::Arguments& args) |
| 276 { | 279 { |
| 277 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 280 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 278 if (args.Length() <= 0) { | 281 if (args.Length() <= 0) { |
| 279 imp->func(); | 282 imp->func(); |
| 280 return v8Undefined(); | 283 return v8Undefined(); |
| 281 } | 284 } |
| 282 if (args.Length() > 0 && !isUndefinedOrNull(args[0]) && !V8long[]::HasInstan
ce(args[0], args.GetIsolate(), worldType(args.GetIsolate()))) | |
| 283 return throwTypeError(0, args.GetIsolate()); | |
| 284 V8TRYCATCH(Vector<int>, x, toNativeArray<int>(args[0])); | 285 V8TRYCATCH(Vector<int>, x, toNativeArray<int>(args[0])); |
| 285 imp->func(x); | 286 imp->func(x); |
| 286 return v8Undefined(); | 287 return v8Undefined(); |
| 287 } | 288 } |
| 288 | 289 |
| 289 static v8::Handle<v8::Value> funcMethodCallback(const v8::Arguments& args) | 290 static v8::Handle<v8::Value> funcMethodCallback(const v8::Arguments& args) |
| 290 { | 291 { |
| 291 return TestTypedefsV8Internal::funcMethod(args); | 292 return TestTypedefsV8Internal::funcMethod(args); |
| 292 } | 293 } |
| 293 | 294 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionA
ttrGetterCallback, TestTypedefsV8Internal::attrWithSetterExceptionAttrSetterCall
back, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 479 {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionA
ttrGetterCallback, TestTypedefsV8Internal::attrWithSetterExceptionAttrSetterCall
back, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 479 // Attribute 'stringAttrWithGetterException' (Type: 'attribute' ExtAttr: 'Ge
tterRaisesException') | 480 // Attribute 'stringAttrWithGetterException' (Type: 'attribute' ExtAttr: 'Ge
tterRaisesException') |
| 480 {"stringAttrWithGetterException", TestTypedefsV8Internal::stringAttrWithGett
erExceptionAttrGetterCallback, TestTypedefsV8Internal::stringAttrWithGetterExcep
tionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8
::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 481 {"stringAttrWithGetterException", TestTypedefsV8Internal::stringAttrWithGett
erExceptionAttrGetterCallback, TestTypedefsV8Internal::stringAttrWithGetterExcep
tionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8
::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 481 // Attribute 'stringAttrWithSetterException' (Type: 'attribute' ExtAttr: 'Se
tterRaisesException') | 482 // Attribute 'stringAttrWithSetterException' (Type: 'attribute' ExtAttr: 'Se
tterRaisesException') |
| 482 {"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSett
erExceptionAttrGetterCallback, TestTypedefsV8Internal::stringAttrWithSetterExcep
tionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8
::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 483 {"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSett
erExceptionAttrGetterCallback, TestTypedefsV8Internal::stringAttrWithSetterExcep
tionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8
::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
| 483 }; | 484 }; |
| 484 | 485 |
| 485 static const V8DOMConfiguration::BatchedMethod V8TestTypedefsMethods[] = { | 486 static const V8DOMConfiguration::BatchedMethod V8TestTypedefsMethods[] = { |
| 486 {"func", TestTypedefsV8Internal::funcMethodCallback, 0, 0}, | 487 {"func", TestTypedefsV8Internal::funcMethodCallback, 0, 0}, |
| 487 {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback, 0, 3}, | 488 {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback, 0, 3}, |
| 489 {"methodWithSequenceArg", TestTypedefsV8Internal::methodWithSequenceArgMetho
dCallback, 0, 1}, |
| 490 {"nullableArrayArg", TestTypedefsV8Internal::nullableArrayArgMethodCallback,
0, 1}, |
| 488 {"funcWithClamp", TestTypedefsV8Internal::funcWithClampMethodCallback, 0, 1}
, | 491 {"funcWithClamp", TestTypedefsV8Internal::funcWithClampMethodCallback, 0, 1}
, |
| 489 {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMet
hodCallback, 0, 0}, | 492 {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMet
hodCallback, 0, 0}, |
| 493 {"stringArrayFunction", TestTypedefsV8Internal::stringArrayFunctionMethodCal
lback, 0, 1}, |
| 494 {"stringArrayFunction2", TestTypedefsV8Internal::stringArrayFunction2MethodC
allback, 0, 1}, |
| 490 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal
lback, 0, 0}, | 495 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal
lback, 0, 0}, |
| 491 }; | 496 }; |
| 492 | 497 |
| 493 v8::Handle<v8::Value> V8TestTypedefs::constructorCallback(const v8::Arguments& a
rgs) | 498 v8::Handle<v8::Value> V8TestTypedefs::constructorCallback(const v8::Arguments& a
rgs) |
| 494 { | 499 { |
| 495 if (!args.IsConstructCall()) | 500 if (!args.IsConstructCall()) |
| 496 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); | 501 return throwTypeError("DOM object constructor cannot be called as a func
tion.", args.GetIsolate()); |
| 497 | 502 |
| 498 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) | 503 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) |
| 499 return args.Holder(); | 504 return args.Holder(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 510 V8TestTypedefsAttrs, WTF_ARRAY_LENGTH(V8TestTypedefsAttrs), | 515 V8TestTypedefsAttrs, WTF_ARRAY_LENGTH(V8TestTypedefsAttrs), |
| 511 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), isolate,
currentWorldType); | 516 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), isolate,
currentWorldType); |
| 512 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. | 517 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. |
| 513 desc->SetCallHandler(V8TestTypedefs::constructorCallback); | 518 desc->SetCallHandler(V8TestTypedefs::constructorCallback); |
| 514 desc->SetLength(2); | 519 desc->SetLength(2); |
| 515 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); | 520 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); |
| 516 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); | 521 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); |
| 517 UNUSED_PARAM(instance); // In some cases, it will not be used. | 522 UNUSED_PARAM(instance); // In some cases, it will not be used. |
| 518 UNUSED_PARAM(proto); // In some cases, it will not be used. | 523 UNUSED_PARAM(proto); // In some cases, it will not be used. |
| 519 | 524 |
| 520 // Custom Signature 'methodWithSequenceArg' | |
| 521 const int methodWithSequenceArgArgc = 1; | |
| 522 v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenc
eArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8sequence<Serialize
dScriptValue>::info, currentWorldType) }; | |
| 523 v8::Handle<v8::Signature> methodWithSequenceArgSignature = v8::Signature::Ne
w(desc, methodWithSequenceArgArgc, methodWithSequenceArgArgv); | |
| 524 proto->Set(v8::String::NewSymbol("methodWithSequenceArg"), v8::FunctionTempl
ate::New(TestTypedefsV8Internal::methodWithSequenceArgMethodCallback, v8Undefine
d(), methodWithSequenceArgSignature, 1)); | |
| 525 | |
| 526 // Custom Signature 'nullableArrayArg' | |
| 527 const int nullableArrayArgArgc = 1; | |
| 528 v8::Handle<v8::FunctionTemplate> nullableArrayArgArgv[nullableArrayArgArgc]
= { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, currentWo
rldType) }; | |
| 529 v8::Handle<v8::Signature> nullableArrayArgSignature = v8::Signature::New(des
c, nullableArrayArgArgc, nullableArrayArgArgv); | |
| 530 proto->Set(v8::String::NewSymbol("nullableArrayArg"), v8::FunctionTemplate::
New(TestTypedefsV8Internal::nullableArrayArgMethodCallback, v8Undefined(), nulla
bleArrayArgSignature, 1)); | |
| 531 | |
| 532 // Custom Signature 'stringArrayFunction' | |
| 533 const int stringArrayFunctionArgc = 1; | |
| 534 v8::Handle<v8::FunctionTemplate> stringArrayFunctionArgv[stringArrayFunction
Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, cur
rentWorldType) }; | |
| 535 v8::Handle<v8::Signature> stringArrayFunctionSignature = v8::Signature::New(
desc, stringArrayFunctionArgc, stringArrayFunctionArgv); | |
| 536 proto->Set(v8::String::NewSymbol("stringArrayFunction"), v8::FunctionTemplat
e::New(TestTypedefsV8Internal::stringArrayFunctionMethodCallback, v8Undefined(),
stringArrayFunctionSignature, 1)); | |
| 537 | |
| 538 // Custom Signature 'stringArrayFunction2' | |
| 539 const int stringArrayFunction2Argc = 1; | |
| 540 v8::Handle<v8::FunctionTemplate> stringArrayFunction2Argv[stringArrayFunctio
n2Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, c
urrentWorldType) }; | |
| 541 v8::Handle<v8::Signature> stringArrayFunction2Signature = v8::Signature::New
(desc, stringArrayFunction2Argc, stringArrayFunction2Argv); | |
| 542 proto->Set(v8::String::NewSymbol("stringArrayFunction2"), v8::FunctionTempla
te::New(TestTypedefsV8Internal::stringArrayFunction2MethodCallback, v8Undefined(
), stringArrayFunction2Signature, 1)); | |
| 543 | |
| 544 // Custom toString template | 525 // Custom toString template |
| 545 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); | 526 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); |
| 546 return desc; | 527 return desc; |
| 547 } | 528 } |
| 548 | 529 |
| 549 v8::Persistent<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* is
olate, WrapperWorldType currentWorldType) | 530 v8::Persistent<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* is
olate, WrapperWorldType currentWorldType) |
| 550 { | 531 { |
| 551 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 532 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 552 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&info); | 533 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&info); |
| 553 if (result != data->templateMap(currentWorldType).end()) | 534 if (result != data->templateMap(currentWorldType).end()) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 installPerContextProperties(wrapper, impl.get(), isolate); | 570 installPerContextProperties(wrapper, impl.get(), isolate); |
| 590 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); | 571 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); |
| 591 return wrapper; | 572 return wrapper; |
| 592 } | 573 } |
| 593 void V8TestTypedefs::derefObject(void* object) | 574 void V8TestTypedefs::derefObject(void* object) |
| 594 { | 575 { |
| 595 static_cast<TestTypedefs*>(object)->deref(); | 576 static_cast<TestTypedefs*>(object)->deref(); |
| 596 } | 577 } |
| 597 | 578 |
| 598 } // namespace WebCore | 579 } // namespace WebCore |
| OLD | NEW |