| OLD | NEW |
| 1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
| 2 #include "config.h" | 2 #include "config.h" |
| 3 {% filter conditional(conditional_string) %} | 3 {% filter conditional(conditional_string) %} |
| 4 #include "{{v8_class_or_partial}}.h" | 4 #include "{{v8_class_or_partial}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class | 11 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class |
| 12 if is_active_dom_object else '0' %} | 12 if is_active_dom_object else '0' %} |
| 13 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class | 13 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class |
| 14 if has_visit_dom_wrapper else '0' %} | 14 if has_visit_dom_wrapper else '0' %} |
| 15 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface | 15 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface |
| 16 if parent_interface else '0' %} | 16 if parent_interface else '0' %} |
| 17 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else | 17 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else |
| 18 'WrapperTypeObjectPrototype' %} | 18 'WrapperTypeObjectPrototype' %} |
| 19 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie
w else '0' %} | 19 {% set dom_template = '%s::domTemplate' % v8_class if not is_array_buffer_or_vie
w else '0' %} |
| 20 | 20 |
| 21 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} | 21 {% set wrapper_type_info_const = '' if has_partial_interface else 'const ' %} |
| 22 {% if not is_partial %} | 22 {% if not is_partial %} |
| 23 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 24 // and does not depend on another global objects. |
| 25 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 26 #pragma clang diagnostic push |
| 27 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 28 #endif |
| 23 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin
::kEmbedderBlink, {{dom_template}}, {{v8_class}}::refObject, {{v8_class}}::deref
Object, {{v8_class}}::trace, {{to_active_dom_object}}, {{visit_dom_wrapper}}, {{
v8_class}}::preparePrototypeObject, {{v8_class}}::installConditionallyEnabledPro
perties, "{{interface_name}}", {{parent_wrapper_type_info}}, WrapperTypeInfo::{{
wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo
::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::
{{gc_type}} }; | 29 {{wrapper_type_info_const}}WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin
::kEmbedderBlink, {{dom_template}}, {{v8_class}}::refObject, {{v8_class}}::deref
Object, {{v8_class}}::trace, {{to_active_dom_object}}, {{visit_dom_wrapper}}, {{
v8_class}}::preparePrototypeObject, {{v8_class}}::installConditionallyEnabledPro
perties, "{{interface_name}}", {{parent_wrapper_type_info}}, WrapperTypeInfo::{{
wrapper_type_prototype}}, WrapperTypeInfo::{{wrapper_class_id}}, WrapperTypeInfo
::{{event_target_inheritance}}, WrapperTypeInfo::{{lifetime}}, WrapperTypeInfo::
{{gc_type}} }; |
| 30 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 31 #pragma clang diagnostic pop |
| 32 #endif |
| 24 | 33 |
| 25 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}
}.h. | 34 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in {{cpp_class}
}.h. |
| 26 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 35 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 27 // bindings/core/v8/ScriptWrappable.h. | 36 // bindings/core/v8/ScriptWrappable.h. |
| 28 {% if not is_typed_array_type %} | 37 {% if not is_typed_array_type %} |
| 29 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT
ypeInfo; | 38 const WrapperTypeInfo& {{cpp_class}}::s_wrapperTypeInfo = {{v8_class}}::wrapperT
ypeInfo; |
| 30 {% endif %} | 39 {% endif %} |
| 31 | 40 |
| 32 {% endif %} | 41 {% endif %} |
| 33 {% if not is_array_buffer_or_view %} | 42 {% if not is_array_buffer_or_view %} |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 {% block named_property_enumerator %}{% endblock %} | 213 {% block named_property_enumerator %}{% endblock %} |
| 205 {% block named_property_enumerator_callback %}{% endblock %} | 214 {% block named_property_enumerator_callback %}{% endblock %} |
| 206 } // namespace {{cpp_class_or_partial}}V8Internal | 215 } // namespace {{cpp_class_or_partial}}V8Internal |
| 207 | 216 |
| 208 {% block visit_dom_wrapper %}{% endblock %} | 217 {% block visit_dom_wrapper %}{% endblock %} |
| 209 {% block shadow_attributes %}{% endblock %} | 218 {% block shadow_attributes %}{% endblock %} |
| 210 {##############################################################################} | 219 {##############################################################################} |
| 211 {% block install_attributes %} | 220 {% block install_attributes %} |
| 212 {% from 'attributes.cpp' import attribute_configuration with context %} | 221 {% from 'attributes.cpp' import attribute_configuration with context %} |
| 213 {% if has_attribute_configuration %} | 222 {% if has_attribute_configuration %} |
| 223 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial |
| 224 // and does not depend on another global objects. |
| 225 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 226 #pragma clang diagnostic push |
| 227 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 228 #endif |
| 214 static const V8DOMConfiguration::AttributeConfiguration {{v8_class}}Attributes[]
= { | 229 static const V8DOMConfiguration::AttributeConfiguration {{v8_class}}Attributes[]
= { |
| 215 {% for attribute in attributes | 230 {% for attribute in attributes |
| 216 if not (attribute.is_expose_js_accessors or | 231 if not (attribute.is_expose_js_accessors or |
| 217 attribute.is_static or | 232 attribute.is_static or |
| 218 attribute.runtime_enabled_function or | 233 attribute.runtime_enabled_function or |
| 219 attribute.exposed_test or | 234 attribute.exposed_test or |
| 220 (interface_name == 'Window' and attribute.is_unforgeable)) | 235 (interface_name == 'Window' and attribute.is_unforgeable)) |
| 221 and attribute.should_be_exposed_to_script %} | 236 and attribute.should_be_exposed_to_script %} |
| 222 {% filter conditional(attribute.conditional_string) %} | 237 {% filter conditional(attribute.conditional_string) %} |
| 223 {{attribute_configuration(attribute)}}, | 238 {{attribute_configuration(attribute)}}, |
| 224 {% endfilter %} | 239 {% endfilter %} |
| 225 {% endfor %} | 240 {% endfor %} |
| 226 }; | 241 }; |
| 242 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 243 #pragma clang diagnostic pop |
| 244 #endif |
| 227 | 245 |
| 228 {% endif %} | 246 {% endif %} |
| 229 {% endblock %} | 247 {% endblock %} |
| 230 {##############################################################################} | 248 {##############################################################################} |
| 231 {% block install_accessors %} | 249 {% block install_accessors %} |
| 232 {% from 'attributes.cpp' import attribute_configuration with context %} | 250 {% from 'attributes.cpp' import attribute_configuration with context %} |
| 233 {% if has_accessor_configuration %} | 251 {% if has_accessor_configuration %} |
| 234 static const V8DOMConfiguration::AccessorConfiguration {{v8_class}}Accessors[] =
{ | 252 static const V8DOMConfiguration::AccessorConfiguration {{v8_class}}Accessors[] =
{ |
| 235 {% for attribute in attributes | 253 {% for attribute in attributes |
| 236 if (attribute.is_expose_js_accessors and | 254 if (attribute.is_expose_js_accessors and |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 {% endfor %} | 511 {% endfor %} |
| 494 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 512 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
| 495 {{attribute_getter_implemented_in_private_script(attribute)}} | 513 {{attribute_getter_implemented_in_private_script(attribute)}} |
| 496 {% if attribute.has_setter %} | 514 {% if attribute.has_setter %} |
| 497 {{attribute_setter_implemented_in_private_script(attribute)}} | 515 {{attribute_setter_implemented_in_private_script(attribute)}} |
| 498 {% endif %} | 516 {% endif %} |
| 499 {% endfor %} | 517 {% endfor %} |
| 500 {% block partial_interface %}{% endblock %} | 518 {% block partial_interface %}{% endblock %} |
| 501 } // namespace blink | 519 } // namespace blink |
| 502 {% endfilter %} | 520 {% endfilter %} |
| OLD | NEW |