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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 {% if is_partial %} | 636 {% if is_partial %} |
637 {{v8_class}}::installConditionallyEnabledMethods(prototypeObject, isolate); | 637 {{v8_class}}::installConditionallyEnabledMethods(prototypeObject, isolate); |
638 {% endif %} | 638 {% endif %} |
639 {% if conditionally_enabled_methods %} | 639 {% if conditionally_enabled_methods %} |
640 {# Define per-context enabled operations #} | 640 {# Define per-context enabled operations #} |
641 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 641 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
642 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 642 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
643 ASSERT(context); | 643 ASSERT(context); |
644 | 644 |
645 {% for method in conditionally_enabled_methods %} | 645 {% for method in conditionally_enabled_methods %} |
646 {% filter per_context_enabled(method.per_context_enabled_function) %} | 646 {% filter per_context_enabled(method.overloads.per_context_enabled_function_
all |
647 {% filter exposed(method.exposed_test) %} | 647 if method.overloads else |
648 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all if m
ethod.overloads else method.runtime_enabled_function) %} | 648 method.per_context_enabled_function) %} |
| 649 {% filter exposed(method.overloads.exposed_test_all |
| 650 if method.overloads else |
| 651 method.exposed_test) %} |
| 652 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all |
| 653 if method.overloads else |
| 654 method.runtime_enabled_function) %} |
649 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()); | 655 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()); |
650 {% endfilter %} | 656 {% endfilter %}{# runtime_enabled() #} |
651 {% endfilter %} | 657 {% endfilter %}{# exposed() #} |
652 {% endfilter %} | 658 {% endfilter %}{# per_context_enabled() #} |
653 {% endfor %} | 659 {% endfor %} |
654 {% endif %} | 660 {% endif %} |
655 } | 661 } |
656 {%- endmacro %} | 662 {%- endmacro %} |
OLD | NEW |