| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro generate_method(method, world_suffix) %} | 2 {% macro generate_method(method, world_suffix) %} |
| 3 {% filter conditional(method.conditional_string) %} | 3 {% filter conditional(method.conditional_string) %} |
| 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 5 { | 5 { |
| 6 {# Local variables #} | 6 {# Local variables #} |
| 7 {% if method.has_exception_state %} | 7 {% if method.has_exception_state %} |
| 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); | 8 ExceptionState exceptionState(ExceptionState::ExecutionContext, "{{method.na
me}}", "{{interface_name}}", info.Holder(), info.GetIsolate()); |
| 9 {% endif %} | 9 {% endif %} |
| 10 {# Overloaded methods have length checked during overload resolution #} | 10 {# Overloaded methods have length checked during overload resolution #} |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 {% set method_callback_for_main_world = '%sForMainWorld' % method_callback | 617 {% set method_callback_for_main_world = '%sForMainWorld' % method_callback |
| 618 if method.is_per_world_bindings else '0' %} | 618 if method.is_per_world_bindings else '0' %} |
| 619 {% set method_length = method.overloads.length if method.overloads else method.l
ength %} | 619 {% set method_length = method.overloads.length if method.overloads else method.l
ength %} |
| 620 {% set property_attribute = | 620 {% set property_attribute = |
| 621 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(method.property_attribut
es) | 621 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(method.property_attribut
es) |
| 622 if method.property_attributes else 'v8::None' %} | 622 if method.property_attributes else 'v8::None' %} |
| 623 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat
eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo
sedToAllScripts' %} | 623 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat
eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo
sedToAllScripts' %} |
| 624 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= { | 624 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= { |
| 625 "{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}},
{{method_length}}, {{only_exposed_to_private_script}}, | 625 "{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}},
{{method_length}}, {{only_exposed_to_private_script}}, |
| 626 }; | 626 }; |
| 627 V8DOMConfiguration::installMethod({{method.function_template}}, {{method.signatu
re}}, {{property_attribute}}, {{method.name}}MethodConfiguration, isolate); | 627 V8DOMConfiguration::installMethod(isolate, {{method.function_template}}, {{metho
d.signature}}, {{property_attribute}}, {{method.name}}MethodConfiguration); |
| 628 {%- endmacro %} | 628 {%- endmacro %} |
| 629 | 629 |
| 630 {######################################} | 630 {######################################} |
| 631 {% macro install_conditionally_enabled_methods() %} | 631 {% macro install_conditionally_enabled_methods() %} |
| 632 void {{v8_class_or_partial}}::installConditionallyEnabledMethods(v8::Local<v8::O
bject> prototypeObject, v8::Isolate* isolate) | 632 void {{v8_class_or_partial}}::installConditionallyEnabledMethods(v8::Local<v8::O
bject> prototypeObject, v8::Isolate* isolate) |
| 633 { | 633 { |
| 634 {% if is_partial %} | 634 {% if is_partial %} |
| 635 {{v8_class}}::installConditionallyEnabledMethods(prototypeObject, isolate); | 635 {{v8_class}}::installConditionallyEnabledMethods(prototypeObject, isolate); |
| 636 {% endif %} | 636 {% endif %} |
| 637 {% if conditionally_enabled_methods %} | 637 {% if conditionally_enabled_methods %} |
| (...skipping 13 matching lines...) Expand all Loading... |
| 651 if method.overloads else | 651 if method.overloads else |
| 652 method.runtime_enabled_function) %} | 652 method.runtime_enabled_function) %} |
| 653 prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::Functio
nTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}Metho
dCallback, v8Undefined(), defaultSignature, {{method.number_of_required_argument
s}})->GetFunction()); | 653 prototypeObject->Set(v8AtomicString(isolate, "{{method.name}}"), v8::Functio
nTemplate::New(isolate, {{cpp_class_or_partial}}V8Internal::{{method.name}}Metho
dCallback, v8Undefined(), defaultSignature, {{method.number_of_required_argument
s}})->GetFunction()); |
| 654 {% endfilter %}{# runtime_enabled() #} | 654 {% endfilter %}{# runtime_enabled() #} |
| 655 {% endfilter %}{# exposed() #} | 655 {% endfilter %}{# exposed() #} |
| 656 {% endfilter %}{# per_context_enabled() #} | 656 {% endfilter %}{# per_context_enabled() #} |
| 657 {% endfor %} | 657 {% endfor %} |
| 658 {% endif %} | 658 {% endif %} |
| 659 } | 659 } |
| 660 {%- endmacro %} | 660 {%- endmacro %} |
| OLD | NEW |