| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% macro attribute_configuration(attribute) %} | 5 {% macro attribute_configuration(attribute) %} |
| 6 {% set getter_callback = | 6 {% set getter_callback = |
| 7 '%sV8Internal::%sAttributeGetterCallback' % | 7 '%sV8Internal::%sAttributeGetterCallback' % |
| 8 (cpp_class, attribute.name) | 8 (cpp_class, attribute.name) |
| 9 if not attribute.constructor_type else | 9 if not attribute.constructor_type else |
| 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} | 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 456 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 457 {{attribute_configuration(attribute)}}; | 457 {{attribute_configuration(attribute)}}; |
| 458 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); | 458 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); |
| 459 } | 459 } |
| 460 {% endfilter %} | 460 {% endfilter %} |
| 461 {% endfor %} | 461 {% endfor %} |
| 462 {% if constants %} | 462 {% if constants %} |
| 463 {{install_constants() | indent}} | 463 {{install_constants() | indent}} |
| 464 {% endif %} | 464 {% endif %} |
| 465 {% for method in methods if not method.do_not_check_signature %} | 465 {% for method in methods if not method.do_not_check_signature %} |
| 466 {% if method.custom_signature and not method.overload_index %} | |
| 467 {# No custom signature needed for overloaded methods; | |
| 468 separate check because depends on global check for overloads #} | |
| 469 | |
| 470 // Custom Signature '{{method.name}}' | |
| 471 const int {{method.name}}Argc = {{method.arguments | length}}; | |
| 472 v8::Handle<v8::FunctionTemplate> {{method.name}}Argv[{{method.name}}Argc] =
{ {{method.custom_signature}} }; | |
| 473 v8::Handle<v8::Signature> {{method.name}}Signature = v8::Signature::New(isol
ate, functionTemplate, {{method.name}}Argc, {{method.name}}Argv); | |
| 474 {% endif %} | |
| 475 {# install_custom_signature #} | 466 {# install_custom_signature #} |
| 476 {% if not method.overload_index or method.overload_index == 1 %} | 467 {% if not method.overload_index or method.overload_index == 1 %} |
| 477 {# For overloaded methods, only generate one accessor #} | 468 {# For overloaded methods, only generate one accessor #} |
| 478 {% filter conditional(method.conditional_string) %} | 469 {% filter conditional(method.conditional_string) %} |
| 479 {% if method.is_do_not_check_security %} | 470 {% if method.is_do_not_check_security %} |
| 480 {% if method.is_per_world_bindings %} | 471 {% if method.is_per_world_bindings %} |
| 481 if (currentWorldType == MainWorld) { | 472 if (currentWorldType == MainWorld) { |
| 482 {{install_do_not_check_security_signature(method, 'ForMainWorld')}} | 473 {{install_do_not_check_security_signature(method, 'ForMainWorld')}} |
| 483 } else { | 474 } else { |
| 484 {{install_do_not_check_security_signature(method)}} | 475 {{install_do_not_check_security_signature(method)}} |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 fromInternalPointer(object)->deref(); | 731 fromInternalPointer(object)->deref(); |
| 741 } | 732 } |
| 742 | 733 |
| 743 template<> | 734 template<> |
| 744 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 735 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 745 { | 736 { |
| 746 return toV8(impl, creationContext, isolate); | 737 return toV8(impl, creationContext, isolate); |
| 747 } | 738 } |
| 748 | 739 |
| 749 {% endblock %} | 740 {% endblock %} |
| OLD | NEW |