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

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 16708002: Simplify Custom Element constructors to be functions, not wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/bindings/v8/CustomElementHelpers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 1456
1457 static void anyAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8: :PropertyCallbackInfo<v8::Value>& info) 1457 static void anyAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8: :PropertyCallbackInfo<v8::Value>& info)
1458 { 1458 {
1459 TestObjV8Internal::anyAttributeAttrGetter(name, info); 1459 TestObjV8Internal::anyAttributeAttrGetter(name, info);
1460 } 1460 }
1461 1461
1462 static void anyAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val ue> value, const v8::PropertyCallbackInfo<void>& info) 1462 static void anyAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Val ue> value, const v8::PropertyCallbackInfo<void>& info)
1463 { 1463 {
1464 TestObj* imp = V8TestObject::toNative(info.Holder()); 1464 TestObj* imp = V8TestObject::toNative(info.Holder());
1465 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value)); 1465 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value));
1466 imp->setAnyAttribute(WTF::getPtr(v)); 1466 imp->setAnyAttribute(v);
1467 return; 1467 return;
1468 } 1468 }
1469 1469
1470 static void anyAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local <v8::Value> value, const v8::PropertyCallbackInfo<void>& info) 1470 static void anyAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local <v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1471 { 1471 {
1472 TestObjV8Internal::anyAttributeAttrSetter(name, value, info); 1472 TestObjV8Internal::anyAttributeAttrSetter(name, value, info);
1473 } 1473 }
1474 1474
1475 static void callbackFunctionAttributeAttrGetter(v8::Local<v8::String> name, cons t v8::PropertyCallbackInfo<v8::Value>& info)
1476 {
1477 TestObj* imp = V8TestObject::toNative(info.Holder());
1478 v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value());
1479 return;
1480 }
1481
1482 static void callbackFunctionAttributeAttrGetterCallback(v8::Local<v8::String> na me, const v8::PropertyCallbackInfo<v8::Value>& info)
1483 {
1484 TestObjV8Internal::callbackFunctionAttributeAttrGetter(name, info);
1485 }
1486
1487 static void callbackFunctionAttributeAttrSetter(v8::Local<v8::String> name, v8:: Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1488 {
1489 TestObj* imp = V8TestObject::toNative(info.Holder());
1490 V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value));
1491 imp->setCallbackFunctionAttribute(v);
1492 return;
1493 }
1494
1495 static void callbackFunctionAttributeAttrSetterCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
1496 {
1497 TestObjV8Internal::callbackFunctionAttributeAttrSetter(name, value, info);
1498 }
1499
1475 static void enabledAtRuntimeAttr1AttrGetter(v8::Local<v8::String> name, const v8 ::PropertyCallbackInfo<v8::Value>& info) 1500 static void enabledAtRuntimeAttr1AttrGetter(v8::Local<v8::String> name, const v8 ::PropertyCallbackInfo<v8::Value>& info)
1476 { 1501 {
1477 TestObj* imp = V8TestObject::toNative(info.Holder()); 1502 TestObj* imp = V8TestObject::toNative(info.Holder());
1478 v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr1()); 1503 v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr1());
1479 return; 1504 return;
1480 } 1505 }
1481 1506
1482 static void enabledAtRuntimeAttr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 1507 static void enabledAtRuntimeAttr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
1483 { 1508 {
1484 TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter(name, info); 1509 TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter(name, info);
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3467 3492
3468 #if ENABLE(Condition1) || ENABLE(Condition2) 3493 #if ENABLE(Condition1) || ENABLE(Condition2)
3469 3494
3470 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args) 3495 static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& args)
3471 { 3496 {
3472 TestObjV8Internal::conditionalMethod3Method(args); 3497 TestObjV8Internal::conditionalMethod3Method(args);
3473 } 3498 }
3474 3499
3475 #endif // ENABLE(Condition1) || ENABLE(Condition2) 3500 #endif // ENABLE(Condition1) || ENABLE(Condition2)
3476 3501
3502 static void callbackFunctionReturnValueMethod(const v8::FunctionCallbackInfo<v8: :Value>& args)
3503 {
3504 TestObj* imp = V8TestObject::toNative(args.Holder());
3505 v8SetReturnValue(args, imp->callbackFunctionReturnValue().v8Value());
3506 return;
3507 }
3508
3509 static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallback Info<v8::Value>& args)
3510 {
3511 TestObjV8Internal::callbackFunctionReturnValueMethod(args);
3512 }
3513
3514 static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Va lue>& args)
3515 {
3516 if (args.Length() < 1) {
3517 throwNotEnoughArgumentsError(args.GetIsolate());
3518 return;
3519 }
3520 TestObj* imp = V8TestObject::toNative(args.Holder());
3521 V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(args[0]));
3522 imp->callbackFunctionArgument(function);
3523
3524 return;
3525 }
3526
3527 static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& args)
3528 {
3529 TestObjV8Internal::callbackFunctionArgumentMethod(args);
3530 }
3531
3477 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 3532 static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
3478 { 3533 {
3479 if (args.Length() < 2) { 3534 if (args.Length() < 2) {
3480 throwNotEnoughArgumentsError(args.GetIsolate()); 3535 throwNotEnoughArgumentsError(args.GetIsolate());
3481 return; 3536 return;
3482 } 3537 }
3483 TestObj* imp = V8TestObject::toNative(args.Holder()); 3538 TestObj* imp = V8TestObject::toNative(args.Holder());
3484 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0); 3539 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.Ge tIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8 ::Object>::Cast(args[0])) : 0);
3485 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]); 3540 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
3486 imp->overloadedMethod(objArg, strArg); 3541 imp->overloadedMethod(objArg, strArg);
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
4672 #if ENABLE(Condition1) || ENABLE(Condition2) 4727 #if ENABLE(Condition1) || ENABLE(Condition2)
4673 // Attribute 'conditionalAttr6' (Type: 'attribute' ExtAttr: 'Conditional') 4728 // Attribute 'conditionalAttr6' (Type: 'attribute' ExtAttr: 'Conditional')
4674 {"conditionalAttr6", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectC::info, st atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8 ::None | v8::DontEnum), 0 /* on instance */}, 4729 {"conditionalAttr6", TestObjV8Internal::TestObjConstructorGetter, TestObjV8I nternal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectC::info, st atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8 ::None | v8::DontEnum), 0 /* on instance */},
4675 #endif // ENABLE(Condition1) || ENABLE(Condition2) 4730 #endif // ENABLE(Condition1) || ENABLE(Condition2)
4676 // Attribute 'cachedAttribute1' (Type: 'attribute' ExtAttr: '') 4731 // Attribute 'cachedAttribute1' (Type: 'attribute' ExtAttr: '')
4677 {"cachedAttribute1", TestObjV8Internal::cachedAttribute1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 4732 {"cachedAttribute1", TestObjV8Internal::cachedAttribute1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca st<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4678 // Attribute 'cachedAttribute2' (Type: 'attribute' ExtAttr: '') 4733 // Attribute 'cachedAttribute2' (Type: 'attribute' ExtAttr: '')
4679 {"cachedAttribute2", TestObjV8Internal::cachedAttribute2AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca st<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 4734 {"cachedAttribute2", TestObjV8Internal::cachedAttribute2AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_ca st<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4680 // Attribute 'anyAttribute' (Type: 'attribute' ExtAttr: '') 4735 // Attribute 'anyAttribute' (Type: 'attribute' ExtAttr: '')
4681 {"anyAttribute", TestObjV8Internal::anyAttributeAttrGetterCallback, TestObjV 8Internal::anyAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */}, 4736 {"anyAttribute", TestObjV8Internal::anyAttributeAttrGetterCallback, TestObjV 8Internal::anyAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */},
4737 // Attribute 'callbackFunctionAttribute' (Type: 'attribute' ExtAttr: '')
4738 {"callbackFunctionAttribute", TestObjV8Internal::callbackFunctionAttributeAt trGetterCallback, TestObjV8Internal::callbackFunctionAttributeAttrSetterCallback , 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas t<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4682 // Attribute 'floatArray' (Type: 'attribute' ExtAttr: '') 4739 // Attribute 'floatArray' (Type: 'attribute' ExtAttr: '')
4683 {"floatArray", TestObjV8Internal::floatArrayAttrGetterCallback, TestObjV8Int ernal::floatArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}, 4740 {"floatArray", TestObjV8Internal::floatArrayAttrGetterCallback, TestObjV8Int ernal::floatArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
4684 // Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '') 4741 // Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '')
4685 {"doubleArray", TestObjV8Internal::doubleArrayAttrGetterCallback, TestObjV8I nternal::doubleArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::A ccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* o n instance */}, 4742 {"doubleArray", TestObjV8Internal::doubleArrayAttrGetterCallback, TestObjV8I nternal::doubleArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::A ccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* o n instance */},
4686 // Attribute 'messagePortArray' (Type: 'attribute' ExtAttr: '') 4743 // Attribute 'messagePortArray' (Type: 'attribute' ExtAttr: '')
4687 {"messagePortArray", TestObjV8Internal::messagePortArrayAttrGetterCallback, TestObjV8Internal::messagePortArrayAttrSetterCallback, 0, 0, 0 /* no data */, st atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8 ::None), 0 /* on instance */}, 4744 {"messagePortArray", TestObjV8Internal::messagePortArrayAttrGetterCallback, TestObjV8Internal::messagePortArrayAttrSetterCallback, 0, 0, 0 /* no data */, st atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8 ::None), 0 /* on instance */},
4688 // Attribute 'contentDocument' (Type: 'attribute' ExtAttr: 'CheckSecurityFor Node') 4745 // Attribute 'contentDocument' (Type: 'attribute' ExtAttr: 'CheckSecurityFor Node')
4689 {"contentDocument", TestObjV8Internal::contentDocumentAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 4746 {"contentDocument", TestObjV8Internal::contentDocumentAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4690 // Attribute 'mutablePoint' (Type: 'attribute' ExtAttr: '') 4747 // Attribute 'mutablePoint' (Type: 'attribute' ExtAttr: '')
4691 {"mutablePoint", TestObjV8Internal::mutablePointAttrGetterCallback, TestObjV 8Internal::mutablePointAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */}, 4748 {"mutablePoint", TestObjV8Internal::mutablePointAttrGetterCallback, TestObjV 8Internal::mutablePointAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */},
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
4787 {"methodWithEnforceRangeUInt64", TestObjV8Internal::methodWithEnforceRangeUI nt64MethodCallback, 0, 1}, 4844 {"methodWithEnforceRangeUInt64", TestObjV8Internal::methodWithEnforceRangeUI nt64MethodCallback, 0, 1},
4788 #if ENABLE(Condition1) 4845 #if ENABLE(Condition1)
4789 {"conditionalMethod1", TestObjV8Internal::conditionalMethod1MethodCallback, 0, 0}, 4846 {"conditionalMethod1", TestObjV8Internal::conditionalMethod1MethodCallback, 0, 0},
4790 #endif 4847 #endif
4791 #if ENABLE(Condition1) && ENABLE(Condition2) 4848 #if ENABLE(Condition1) && ENABLE(Condition2)
4792 {"conditionalMethod2", TestObjV8Internal::conditionalMethod2MethodCallback, 0, 0}, 4849 {"conditionalMethod2", TestObjV8Internal::conditionalMethod2MethodCallback, 0, 0},
4793 #endif 4850 #endif
4794 #if ENABLE(Condition1) || ENABLE(Condition2) 4851 #if ENABLE(Condition1) || ENABLE(Condition2)
4795 {"conditionalMethod3", TestObjV8Internal::conditionalMethod3MethodCallback, 0, 0}, 4852 {"conditionalMethod3", TestObjV8Internal::conditionalMethod3MethodCallback, 0, 0},
4796 #endif 4853 #endif
4854 {"callbackFunctionReturnValue", TestObjV8Internal::callbackFunctionReturnVal ueMethodCallback, 0, 0},
4855 {"callbackFunctionArgument", TestObjV8Internal::callbackFunctionArgumentMeth odCallback, 0, 1},
4797 {"overloadedMethod", TestObjV8Internal::overloadedMethodMethodCallback, 0, 2 }, 4856 {"overloadedMethod", TestObjV8Internal::overloadedMethodMethodCallback, 0, 2 },
4798 {"classMethodWithClamp", TestObjV8Internal::classMethodWithClampMethodCallba ck, 0, 2}, 4857 {"classMethodWithClamp", TestObjV8Internal::classMethodWithClampMethodCallba ck, 0, 2},
4799 {"methodWithUnsignedLongSequence", TestObjV8Internal::methodWithUnsignedLong SequenceMethodCallback, 0, 1}, 4858 {"methodWithUnsignedLongSequence", TestObjV8Internal::methodWithUnsignedLong SequenceMethodCallback, 0, 1},
4800 {"stringArrayFunction", TestObjV8Internal::stringArrayFunctionMethodCallback , 0, 1}, 4859 {"stringArrayFunction", TestObjV8Internal::stringArrayFunctionMethodCallback , 0, 1},
4801 {"getSVGDocument", TestObjV8Internal::getSVGDocumentMethodCallback, 0, 0}, 4860 {"getSVGDocument", TestObjV8Internal::getSVGDocumentMethodCallback, 0, 0},
4802 {"mutablePointFunction", TestObjV8Internal::mutablePointFunctionMethodCallba ck, 0, 0}, 4861 {"mutablePointFunction", TestObjV8Internal::mutablePointFunctionMethodCallba ck, 0, 0},
4803 {"immutablePointFunction", TestObjV8Internal::immutablePointFunctionMethodCa llback, 0, 0}, 4862 {"immutablePointFunction", TestObjV8Internal::immutablePointFunctionMethodCa llback, 0, 0},
4804 {"orange", TestObjV8Internal::orangeMethodCallback, 0, 0}, 4863 {"orange", TestObjV8Internal::orangeMethodCallback, 0, 0},
4805 {"strictFunction", TestObjV8Internal::strictFunctionMethodCallback, 0, 3}, 4864 {"strictFunction", TestObjV8Internal::strictFunctionMethodCallback, 0, 3},
4806 {"variadicStringMethod", TestObjV8Internal::variadicStringMethodMethodCallba ck, 0, 2}, 4865 {"variadicStringMethod", TestObjV8Internal::variadicStringMethodMethodCallba ck, 0, 2},
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
5088 installPerContextProperties(wrapper, impl.get(), isolate); 5147 installPerContextProperties(wrapper, impl.get(), isolate);
5089 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap perConfiguration::Independent); 5148 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap perConfiguration::Independent);
5090 return wrapper; 5149 return wrapper;
5091 } 5150 }
5092 void V8TestObject::derefObject(void* object) 5151 void V8TestObject::derefObject(void* object)
5093 { 5152 {
5094 static_cast<TestObj*>(object)->deref(); 5153 static_cast<TestObj*>(object)->deref();
5095 } 5154 }
5096 5155
5097 } // namespace WebCore 5156 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | Source/bindings/v8/CustomElementHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698