| OLD | NEW |
| 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} | 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t
o_local_cpp_value %} |
| 2 | 2 |
| 3 {##############################################################################} | 3 {##############################################################################} |
| 4 {% macro generate_method(method, world_suffix) %} | 4 {% macro generate_method(method, world_suffix) %} |
| 5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) { | 5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) { |
| 6 {% filter format_remove_duplicates([ | 6 {% filter format_remove_duplicates([ |
| 7 'ExceptionState exceptionState', | 7 'ExceptionState exceptionState', |
| 8 'ScriptState* scriptState = ']) %} | 8 'ScriptState* scriptState = ']) %} |
| 9 {% set define_exception_state -%} | 9 {% set define_exception_state -%} |
| 10 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "{{interface_name}}", "{{method.name}}"); | 10 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "{{interface_name}}", "{{method.name}}"); |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
[] = { | 629 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
[] = { |
| 630 {{method_configuration(method) | indent(2)}} | 630 {{method_configuration(method) | indent(2)}} |
| 631 }; | 631 }; |
| 632 for (const auto& methodConfig : {{method.name}}MethodConfiguration) | 632 for (const auto& methodConfig : {{method.name}}MethodConfiguration) |
| 633 V8DOMConfiguration::InstallMethod(isolate, world, {{instance_template}}, {{pro
totype_template}}, {{interface_template}}, {{signature}}, methodConfig); | 633 V8DOMConfiguration::InstallMethod(isolate, world, {{instance_template}}, {{pro
totype_template}}, {{interface_template}}, {{signature}}, methodConfig); |
| 634 {%- endmacro %} | 634 {%- endmacro %} |
| 635 | 635 |
| 636 | 636 |
| 637 {######################################} | 637 {######################################} |
| 638 {% macro install_conditionally_enabled_methods() %} | 638 {% macro install_conditionally_enabled_methods() %} |
| 639 {% if methods | conditionally_exposed(is_partial) %} | 639 {% for method in conditionally_enabled_methods %} |
| 640 {% for method in methods | conditionally_exposed(is_partial) %} | |
| 641 {% filter secure_context(method.overloads.secure_context_test_all | 640 {% filter secure_context(method.overloads.secure_context_test_all |
| 642 if method.overloads else | 641 if method.overloads else |
| 643 method.secure_context_test) %} | 642 method.secure_context_test) %} |
| 644 {% filter exposed(method.overloads.exposed_test_all | 643 {% filter exposed(method.overloads.exposed_test_all |
| 645 if method.overloads else | 644 if method.overloads else |
| 646 method.exposed_test) %} | 645 method.exposed_test) %} |
| 647 {% filter runtime_enabled(method.overloads.runtime_enabled_all | 646 {% filter runtime_enabled(method.overloads.runtime_enabled_all |
| 648 if method.overloads else | 647 if method.overloads else |
| 649 method.runtime_enabled_feature_name) %} | 648 method.runtime_enabled_feature_name) %} |
| 650 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
[] = { | 649 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
[] = { |
| 651 {{method_configuration(method) | indent(2)}} | 650 {{method_configuration(method) | indent(2)}} |
| 652 }; | 651 }; |
| 653 for (const auto& methodConfig : {{method.name}}MethodConfiguration) | 652 for (const auto& methodConfig : {{method.name}}MethodConfiguration) |
| 654 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), pro
totypeObject, interfaceObject, signature, methodConfig); | 653 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), pro
totypeObject, interfaceObject, signature, methodConfig); |
| 655 {% endfilter %}{# runtime_enabled() #} | 654 {% endfilter %}{# runtime_enabled() #} |
| 656 {% endfilter %}{# exposed() #} | 655 {% endfilter %}{# exposed() #} |
| 657 {% endfilter %}{# secure_context() #} | 656 {% endfilter %}{# secure_context() #} |
| 658 {% endfor %} | 657 {% endfor %} |
| 659 {% endif %} | |
| 660 {%- endmacro %} | 658 {%- endmacro %} |
| OLD | NEW |