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 ('%sV8Internal::%sConstructorGetterCallback' % | 10 ('%sV8Internal::%sConstructorGetterCallback' % |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 {% if parent_interface %}{# any Event interface except Event itself #} | 798 {% if parent_interface %}{# any Event interface except Event itself #} |
799 if (!initialize{{parent_interface}}(eventInit, options, exceptionState, info
, forEventName.isEmpty() ? String("{{interface_name}}") : forEventName)) | 799 if (!initialize{{parent_interface}}(eventInit, options, exceptionState, info
, forEventName.isEmpty() ? String("{{interface_name}}") : forEventName)) |
800 return false; | 800 return false; |
801 | 801 |
802 {% endif %} | 802 {% endif %} |
803 {% for attribute in attributes | 803 {% for attribute in attributes |
804 if (attribute.is_initialized_by_event_constructor and | 804 if (attribute.is_initialized_by_event_constructor and |
805 not attribute.idl_type == 'any')%} | 805 not attribute.idl_type == 'any')%} |
806 {% set is_nullable = 'true' if attribute.is_nullable else 'false' %} | 806 {% set is_nullable = 'true' if attribute.is_nullable else 'false' %} |
807 {% if attribute.deprecate_as %} | 807 {% if attribute.deprecate_as %} |
808 if (options.convert(conversionContext.setConversionType("{{attribute.idl_typ
e}}", {{is_nullable}}), "{{attribute.name}}", eventInit.{{attribute.cpp_name}}))
{ | 808 if (DictionaryHelper::convert(options, conversionContext.setConversionType("
{{attribute.idl_type}}", {{is_nullable}}), "{{attribute.name}}", eventInit.{{att
ribute.cpp_name}})) { |
809 if (options.hasProperty("{{attribute.name}}")) | 809 if (options.hasProperty("{{attribute.name}}")) |
810 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate
()), UseCounter::{{attribute.deprecate_as}}); | 810 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate
()), UseCounter::{{attribute.deprecate_as}}); |
811 } else { | 811 } else { |
812 return false; | 812 return false; |
813 } | 813 } |
814 {% else %} | 814 {% else %} |
815 if (!options.convert(conversionContext.setConversionType("{{attribute.idl_ty
pe}}", {{is_nullable}}), "{{attribute.name}}", eventInit.{{attribute.cpp_name}})
) | 815 if (!DictionaryHelper::convert(options, conversionContext.setConversionType(
"{{attribute.idl_type}}", {{is_nullable}}), "{{attribute.name}}", eventInit.{{at
tribute.cpp_name}})) |
816 return false; | 816 return false; |
817 {% endif %} | 817 {% endif %} |
818 {% endfor %} | 818 {% endfor %} |
819 return true; | 819 return true; |
820 } | 820 } |
821 | 821 |
822 {% endif %} | 822 {% endif %} |
823 {% endblock %} | 823 {% endblock %} |
824 | 824 |
825 | 825 |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1342 {% endif %} | 1342 {% endif %} |
1343 } | 1343 } |
1344 | 1344 |
1345 template<> | 1345 template<> |
1346 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 1346 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
1347 { | 1347 { |
1348 return toV8(impl, creationContext, isolate); | 1348 return toV8(impl, creationContext, isolate); |
1349 } | 1349 } |
1350 | 1350 |
1351 {% endblock %} | 1351 {% endblock %} |
OLD | NEW |