| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 {% if constructor.arguments %} | 562 {% if constructor.arguments %} |
| 563 {{generate_arguments(constructor) | indent}} | 563 {{generate_arguments(constructor) | indent}} |
| 564 {% endif %} | 564 {% endif %} |
| 565 {{cpp_method_call(constructor, constructor.v8_set_return_value, constructor.
cpp_value) | indent}} | 565 {{cpp_method_call(constructor, constructor.v8_set_return_value, constructor.
cpp_value) | indent}} |
| 566 } | 566 } |
| 567 {% endmacro %} | 567 {% endmacro %} |
| 568 | 568 |
| 569 | 569 |
| 570 {##############################################################################} | 570 {##############################################################################} |
| 571 {% macro generate_constructor_wrapper(constructor) %} | 571 {% macro generate_constructor_wrapper(constructor) %} |
| 572 {% if has_custom_wrap %} | |
| 573 v8::Handle<v8::Object> wrapper = wrapCustom(impl.get(), info.Holder(), info.GetI
solate()); | |
| 574 {% else %} | |
| 575 {% set constructor_class = v8_class + ('Constructor' | 572 {% set constructor_class = v8_class + ('Constructor' |
| 576 if constructor.is_named_constructor else | 573 if constructor.is_named_constructor else |
| 577 '') %} | 574 '') %} |
| 578 v8::Handle<v8::Object> wrapper = info.Holder(); | 575 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 579 {% if is_script_wrappable %} | 576 {% if is_script_wrappable %} |
| 580 impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf
o.GetIsolate()); | 577 impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf
o.GetIsolate()); |
| 581 {% else %} | 578 {% else %} |
| 582 V8DOMWrapper::associateObjectWithWrapper(info.GetIsolate(), impl.get(), &{{const
ructor_class}}::wrapperTypeInfo, wrapper); | 579 V8DOMWrapper::associateObjectWithWrapper(info.GetIsolate(), impl.get(), &{{const
ructor_class}}::wrapperTypeInfo, wrapper); |
| 583 {% endif %} | 580 {% endif %} |
| 584 {% endif %} | |
| 585 v8SetReturnValue(info, wrapper); | 581 v8SetReturnValue(info, wrapper); |
| 586 {% endmacro %} | 582 {% endmacro %} |
| 587 | 583 |
| 588 | 584 |
| 589 {##############################################################################} | 585 {##############################################################################} |
| 590 {% macro method_configuration(method) %} | 586 {% macro method_configuration(method) %} |
| 591 {% set method_callback = | 587 {% set method_callback = |
| 592 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %} | 588 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %} |
| 593 {% set method_callback_for_main_world = | 589 {% set method_callback_for_main_world = |
| 594 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, method.
name) | 590 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, method.
name) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 {% for method in conditionally_enabled_methods %} | 625 {% for method in conditionally_enabled_methods %} |
| 630 {% filter per_context_enabled(method.per_context_enabled_function) %} | 626 {% filter per_context_enabled(method.per_context_enabled_function) %} |
| 631 {% filter exposed(method.exposed_test) %} | 627 {% filter exposed(method.exposed_test) %} |
| 632 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()); | 628 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()); |
| 633 {% endfilter %} | 629 {% endfilter %} |
| 634 {% endfilter %} | 630 {% endfilter %} |
| 635 {% endfor %} | 631 {% endfor %} |
| 636 {% endif %} | 632 {% endif %} |
| 637 } | 633 } |
| 638 {%- endmacro %} | 634 {%- endmacro %} |
| OLD | NEW |