| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptS
tate->isolate()); | 374 v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptS
tate->isolate()); |
| 375 | 375 |
| 376 {# Origin-Trial-enabled attributes #} | 376 {# Origin-Trial-enabled attributes #} |
| 377 {% if attributes | for_origin_trial_feature(origin_trial_feature_name) or | 377 {% if attributes | for_origin_trial_feature(origin_trial_feature_name) or |
| 378 methods | method_for_origin_trial_feature(origin_trial_feature_name, i
s_partial) %} | 378 methods | method_for_origin_trial_feature(origin_trial_feature_name, i
s_partial) %} |
| 379 V8PerIsolateData* perIsolateData = V8PerIsolateData::from(scriptState->isola
te()); | 379 V8PerIsolateData* perIsolateData = V8PerIsolateData::from(scriptState->isola
te()); |
| 380 v8::Local<v8::FunctionTemplate> interfaceTemplate = perIsolateData->findInte
rfaceTemplate(scriptState->world(), &{{v8_class}}::wrapperTypeInfo); | 380 v8::Local<v8::FunctionTemplate> interfaceTemplate = perIsolateData->findInte
rfaceTemplate(scriptState->world(), &{{v8_class}}::wrapperTypeInfo); |
| 381 v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate
(), interfaceTemplate); | 381 v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate
(), interfaceTemplate); |
| 382 ALLOW_UNUSED_LOCAL(signature); | 382 ALLOW_UNUSED_LOCAL(signature); |
| 383 {% endif %} | 383 {% endif %} |
| 384 {% if constants | for_origin_trial_feature(origin_trial_feature_name) or | |
| 385 methods | method_for_origin_trial_feature(origin_trial_feature_name, i
s_partial) %} | |
| 386 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte
xt()); | 384 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte
xt()); |
| 387 v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8
_class}}::wrapperTypeInfo); | 385 v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8
_class}}::wrapperTypeInfo); |
| 388 {% endif %} | 386 ALLOW_UNUSED_LOCAL(interface); |
| 389 {% for attribute in attributes | for_origin_trial_feature(origin_trial_featu
re_name) | unique_by('name') | sort %} | 387 {% for attribute in attributes | for_origin_trial_feature(origin_trial_featu
re_name) | unique_by('name') | sort %} |
| 390 {% if attribute.is_data_type_property %} | 388 {% if attribute.is_data_type_property %} |
| 391 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}}
Configuration = \ | 389 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}}
Configuration = \ |
| 392 {{attribute_configuration(attribute)}}; | 390 {{attribute_configuration(attribute)}}; |
| 393 V8DOMConfiguration::installAttribute(scriptState->isolate(), scriptState->wo
rld(), instance, prototype, attribute{{attribute.name}}Configuration); | 391 V8DOMConfiguration::installAttribute(scriptState->isolate(), scriptState->wo
rld(), instance, prototype, attribute{{attribute.name}}Configuration); |
| 394 {% else %} | 392 {% else %} |
| 395 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Co
nfiguration = \ | 393 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name}}Co
nfiguration = \ |
| 396 {{attribute_configuration(attribute)}}; | 394 {{attribute_configuration(attribute)}}; |
| 397 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor
ld(), instance, prototype, v8::Local<v8::Function>(), signature, accessor{{attri
bute.name}}Configuration); | 395 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor
ld(), instance, prototype, interface, signature, accessor{{attribute.name}}Confi
guration); |
| 398 {% endif %} | 396 {% endif %} |
| 399 {% endfor %} | 397 {% endfor %} |
| 400 {# Origin-Trial-enabled constants #} | 398 {# Origin-Trial-enabled constants #} |
| 401 {% for constant in constants | for_origin_trial_feature(origin_trial_feature
_name) | unique_by('name') | sort %} | 399 {% for constant in constants | for_origin_trial_feature(origin_trial_feature
_name) | unique_by('name') | sort %} |
| 402 {% set constant_name = constant.name.title().replace('_', '') %} | 400 {% set constant_name = constant.name.title().replace('_', '') %} |
| 403 const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Con
figuration = {{constant_configuration(constant)}}; | 401 const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Con
figuration = {{constant_configuration(constant)}}; |
| 404 V8DOMConfiguration::installConstant(scriptState->isolate(), interface, proto
type, constant{{constant_name}}Configuration); | 402 V8DOMConfiguration::installConstant(scriptState->isolate(), interface, proto
type, constant{{constant_name}}Configuration); |
| 405 {% endfor %} | 403 {% endfor %} |
| 406 {# Origin-Trial-enabled methods (no overloads) #} | 404 {# Origin-Trial-enabled methods (no overloads) #} |
| 407 {% for method in methods | method_for_origin_trial_feature(origin_trial_feat
ure_name, is_partial) | unique_by('name') | sort %} | 405 {% for method in methods | method_for_origin_trial_feature(origin_trial_feat
ure_name, is_partial) | unique_by('name') | sort %} |
| (...skipping 19 matching lines...) Expand all Loading... |
| 427 {{method_implemented_in_private_script(method)}} | 425 {{method_implemented_in_private_script(method)}} |
| 428 {% endfor %} | 426 {% endfor %} |
| 429 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 427 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
| 430 {{attribute_getter_implemented_in_private_script(attribute)}} | 428 {{attribute_getter_implemented_in_private_script(attribute)}} |
| 431 {% if attribute.has_setter %} | 429 {% if attribute.has_setter %} |
| 432 {{attribute_setter_implemented_in_private_script(attribute)}} | 430 {{attribute_setter_implemented_in_private_script(attribute)}} |
| 433 {% endif %} | 431 {% endif %} |
| 434 {% endfor %} | 432 {% endfor %} |
| 435 {% block partial_interface %}{% endblock %} | 433 {% block partial_interface %}{% endblock %} |
| 436 } // namespace blink | 434 } // namespace blink |
| OLD | NEW |