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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 {% set constructor_class = v8_class + ('Constructor' | 572 {% set constructor_class = v8_class + ('Constructor' |
573 if constructor.is_named_constructor else | 573 if constructor.is_named_constructor else |
574 '') %} | 574 '') %} |
575 v8::Handle<v8::Object> wrapper = info.Holder(); | 575 v8::Handle<v8::Object> wrapper = info.Holder(); |
576 impl->associateWithWrapper(&{{constructor_class}}::wrapperTypeInfo, wrapper, inf
o.GetIsolate()); | 576 impl->associateWithWrapper(info.GetIsolate(), &{{constructor_class}}::wrapperTyp
eInfo, wrapper); |
577 v8SetReturnValue(info, wrapper); | 577 v8SetReturnValue(info, wrapper); |
578 {% endmacro %} | 578 {% endmacro %} |
579 | 579 |
580 | 580 |
581 {##############################################################################} | 581 {##############################################################################} |
582 {% macro method_configuration(method) %} | 582 {% macro method_configuration(method) %} |
583 {% set method_callback = | 583 {% set method_callback = |
584 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %} | 584 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %} |
585 {% set method_callback_for_main_world = | 585 {% set method_callback_for_main_world = |
586 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, method.
name) | 586 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, method.
name) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 {% for method in conditionally_enabled_methods %} | 621 {% for method in conditionally_enabled_methods %} |
622 {% filter per_context_enabled(method.per_context_enabled_function) %} | 622 {% filter per_context_enabled(method.per_context_enabled_function) %} |
623 {% filter exposed(method.exposed_test) %} | 623 {% filter exposed(method.exposed_test) %} |
624 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()); | 624 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()); |
625 {% endfilter %} | 625 {% endfilter %} |
626 {% endfilter %} | 626 {% endfilter %} |
627 {% endfor %} | 627 {% endfor %} |
628 {% endif %} | 628 {% endif %} |
629 } | 629 } |
630 {%- endmacro %} | 630 {%- endmacro %} |
OLD | NEW |