Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
| 2 #include "{{v8_class_or_partial}}.h" | 2 #include "{{v8_class_or_partial}}.h" |
| 3 | 3 |
| 4 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 4 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
| 5 #include "{{filename}}" | 5 #include "{{filename}}" |
| 6 {% endfor %} | 6 {% endfor %} |
| 7 | 7 |
| 8 namespace blink { | 8 namespace blink { |
| 9 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class | 9 {% set to_active_scriptwrappable = '%s::toActiveScriptWrappable' % v8_class |
| 10 if active_scriptwrappable else '0' %} | 10 if active_scriptwrappable else '0' %} |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 {% endfilter %} | 358 {% endfilter %} |
| 359 {% endfor %} | 359 {% endfor %} |
| 360 {% endif %} | 360 {% endif %} |
| 361 } | 361 } |
| 362 | 362 |
| 363 {% endif %}{# not is_array_buffer_or_view #} | 363 {% endif %}{# not is_array_buffer_or_view #} |
| 364 {% endblock %} | 364 {% endblock %} |
| 365 {##############################################################################} | 365 {##############################################################################} |
| 366 {% block origin_trials %} | 366 {% block origin_trials %} |
| 367 {% from 'attributes.cpp' import attribute_configuration with context %} | 367 {% from 'attributes.cpp' import attribute_configuration with context %} |
| 368 {% for group in attributes|origin_trial_enabled_attributes|groupby('origin_trial _feature_name') %}{{newline}} | 368 {% from 'constants.cpp' import constant_configuration with context %} |
| 369 void {{v8_class_or_partial}}::install{{group.grouper}}(ScriptState* scriptState, v8::Local<v8::Object> instance) | 369 {% for origin_trial_feature_name in origin_trial_feature_names %}{{newline}} |
|
Yuki
2016/06/13 06:47:55
Do we really need this {{newline}}?
iclelland
2016/06/15 14:08:41
It's not strictly needed for correctness, but it p
| |
| 370 void {{v8_class_or_partial}}::install{{origin_trial_feature_name}}(ScriptState* scriptState, v8::Local<v8::Object> instance) | |
| 370 { | 371 { |
| 371 v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptS tate->isolate()); | 372 v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptS tate->isolate()); |
| 372 v8::Local<v8::Signature> signature; | 373 v8::Local<v8::Signature> signature; |
|
Yuki
2016/06/13 06:47:55
Passing the empty signature to V8DOMConfiguration:
iclelland
2016/06/15 14:08:41
Done.
| |
| 373 ALLOW_UNUSED_LOCAL(signature); | 374 ALLOW_UNUSED_LOCAL(signature); |
| 374 {% for attribute in group.list | unique_by('name') | sort %} | 375 {# Origin-Trial-enabled attributes #} |
| 376 {% for attribute in attributes|for_origin_trial_feature(origin_trial_feature _name) | unique_by('name') | sort %} | |
|
Yuki
2016/06/13 06:47:55
Put spaces on the both sides of | operator to be c
iclelland
2016/06/15 14:08:41
Thanks, done.
| |
| 375 {% if attribute.is_data_type_property %} | 377 {% if attribute.is_data_type_property %} |
| 376 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}} Configuration = \ | 378 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}} Configuration = \ |
| 377 {{attribute_configuration(attribute)}}; | 379 {{attribute_configuration(attribute)}}; |
| 378 V8DOMConfiguration::installAttribute(scriptState->isolate(), scriptState->wo rld(), instance, prototype, attribute{{attribute.name}}Configuration); | 380 V8DOMConfiguration::installAttribute(scriptState->isolate(), scriptState->wo rld(), instance, prototype, attribute{{attribute.name}}Configuration); |
| 379 {% else %} | 381 {% else %} |
| 380 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Co nfiguration = \ | 382 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Co nfiguration = \ |
| 381 {{attribute_configuration(attribute)}}; | 383 {{attribute_configuration(attribute)}}; |
| 382 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor ld(), instance, prototype, v8::Local<v8::Function>(), signature, accessor{{attri bute.name}}Configuration); | 384 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor ld(), instance, prototype, v8::Local<v8::Function>(), signature, accessor{{attri bute.name}}Configuration); |
| 383 {% endif %} | 385 {% endif %} |
| 384 {% endfor %} | 386 {% endfor %} |
| 387 | |
| 388 {# Origin-Trial-enabled constants #} | |
| 389 {% for constant in constants | for_origin_trial_feature(origin_trial_feature _name) | unique_by('name') | sort %} | |
| 390 {% set constant_name = constant.name.title().replace('_', '') %} | |
| 391 const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Con figuration = {{constant_configuration(constant)}}; | |
| 392 V8DOMConfiguration::installConstant(scriptState->isolate(), scriptState->wor ld(), prototype, constant{{constant_name}}Configuration); | |
| 393 {% endfor %} | |
| 385 } | 394 } |
| 386 {% endfor %} | 395 {% endfor %} |
| 387 {% endblock %} | 396 {% endblock %} |
| 388 {##############################################################################} | 397 {##############################################################################} |
| 389 {% block get_dom_template %}{% endblock %} | 398 {% block get_dom_template %}{% endblock %} |
| 390 {% block get_dom_template_for_named_properties_object %}{% endblock %} | 399 {% block get_dom_template_for_named_properties_object %}{% endblock %} |
| 391 {% block has_instance %}{% endblock %} | 400 {% block has_instance %}{% endblock %} |
| 392 {% block to_impl %}{% endblock %} | 401 {% block to_impl %}{% endblock %} |
| 393 {% block to_impl_with_type_check %}{% endblock %} | 402 {% block to_impl_with_type_check %}{% endblock %} |
| 394 {% block install_conditional_attributes %}{% endblock %} | 403 {% block install_conditional_attributes %}{% endblock %} |
| 395 {##############################################################################} | 404 {##############################################################################} |
| 396 {% block prepare_prototype_and_interface_object %}{% endblock %} | 405 {% block prepare_prototype_and_interface_object %}{% endblock %} |
| 397 {##############################################################################} | 406 {##############################################################################} |
| 398 {% block to_active_scriptwrappable %}{% endblock %} | 407 {% block to_active_scriptwrappable %}{% endblock %} |
| 399 {% for method in methods if method.is_implemented_in_private_script and method.v isible %} | 408 {% for method in methods if method.is_implemented_in_private_script and method.v isible %} |
| 400 {{method_implemented_in_private_script(method)}} | 409 {{method_implemented_in_private_script(method)}} |
| 401 {% endfor %} | 410 {% endfor %} |
| 402 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 411 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
| 403 {{attribute_getter_implemented_in_private_script(attribute)}} | 412 {{attribute_getter_implemented_in_private_script(attribute)}} |
| 404 {% if attribute.has_setter %} | 413 {% if attribute.has_setter %} |
| 405 {{attribute_setter_implemented_in_private_script(attribute)}} | 414 {{attribute_setter_implemented_in_private_script(attribute)}} |
| 406 {% endif %} | 415 {% endif %} |
| 407 {% endfor %} | 416 {% endfor %} |
| 408 {% block partial_interface %}{% endblock %} | 417 {% block partial_interface %}{% endblock %} |
| 409 } // namespace blink | 418 } // namespace blink |
| OLD | NEW |