OLD | NEW |
1 {% from 'conversions.cpp' import declare_enum_validation_variable, v8_value_to_l
ocal_cpp_value %} | 1 {% from 'conversions.cpp' import declare_enum_validation_variable, v8_value_to_l
ocal_cpp_value %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% macro generate_method(method, world_suffix) %} | 5 {% macro generate_method(method, world_suffix) %} |
6 {% filter conditional(method.conditional_string) %} | 6 {% filter conditional(method.conditional_string) %} |
7 {% if method.returns_promise and method.has_exception_state %} | 7 {% if method.returns_promise and method.has_exception_state %} |
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis
e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat
e) | 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis
e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat
e) |
9 {% else %} | 9 {% else %} |
10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) | 10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
v8::FunctionCallbackInfo<v8::Value>& info) |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 createMinimumArityTypeErrorForMethod(info.GetIsolate(), "{{method.name}}", "{{in
terface_name}}", {{number_of_required_arguments}}, info.Length()) | 359 createMinimumArityTypeErrorForMethod(info.GetIsolate(), "{{method.name}}", "{{in
terface_name}}", {{number_of_required_arguments}}, info.Length()) |
360 {%- endif %} | 360 {%- endif %} |
361 {%- endmacro %} | 361 {%- endmacro %} |
362 | 362 |
363 | 363 |
364 {##############################################################################} | 364 {##############################################################################} |
365 {% macro runtime_determined_length_method(overloads) %} | 365 {% macro runtime_determined_length_method(overloads) %} |
366 static int {{overloads.name}}MethodLength() | 366 static int {{overloads.name}}MethodLength() |
367 { | 367 { |
368 {% for length, runtime_enabled_functions in overloads.runtime_determined_len
gths %} | 368 {% for length, runtime_enabled_functions in overloads.runtime_determined_len
gths %} |
369 {% for runtime_enabled_function in runtime_enabled_functions %} | 369 {% for runtime_enabled_function in runtime_enabled_functions %} |
370 {% filter runtime_enabled(runtime_enabled_function) %} | 370 {% filter runtime_enabled(runtime_enabled_function) %} |
371 return {{length}}; | 371 return {{length}}; |
372 {% endfilter %} | 372 {% endfilter %} |
373 {% endfor %} | 373 {% endfor %} |
374 {% endfor %} | 374 {% endfor %} |
375 } | 375 } |
376 {% endmacro %} | 376 {% endmacro %} |
377 | 377 |
378 | 378 |
379 {##############################################################################} | 379 {##############################################################################} |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 {%- endmacro %} | 694 {%- endmacro %} |
695 | 695 |
696 {######################################} | 696 {######################################} |
697 {% macro install_conditionally_enabled_methods() %} | 697 {% macro install_conditionally_enabled_methods() %} |
698 {% if conditionally_enabled_methods %} | 698 {% if conditionally_enabled_methods %} |
699 {# Define operations with limited exposure #} | 699 {# Define operations with limited exposure #} |
700 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTempl
ate(isolate)); | 700 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTempl
ate(isolate)); |
701 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creatio
nContext()); | 701 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creatio
nContext()); |
702 ASSERT(executionContext); | 702 ASSERT(executionContext); |
703 {% for method in conditionally_enabled_methods %} | 703 {% for method in conditionally_enabled_methods %} |
704 {% filter exposed(method.overloads.exposed_test_all | 704 {% set runtime_enabled_function, api_experiment_name, exposure = (method.overloa
ds.runtime_enabled_function_all, method.overloads.api_experiment_name_all, metho
d.overloads.exposed_test_all) if method.overloads |
705 if method.overloads else | 705 else (method.runtime_enabled_function, method.api_
experiment_name, method.exposed_test) %} |
706 method.exposed_test) %} | 706 {% filter exposed(exposure) %} |
707 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all | 707 {% filter runtime_enabled(runtime_enabled_function) %} |
708 if method.overloads else | |
709 method.runtime_enabled_function) %} | |
710 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; | 708 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration
= {{method_configuration(method)}}; |
711 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj
ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration); | 709 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj
ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration); |
712 {% endfilter %}{# runtime_enabled() #} | 710 {% endfilter %}{# runtime_enabled() #} |
713 {% endfilter %}{# exposed() #} | 711 {% endfilter %}{# exposed() #} |
714 {% endfor %} | 712 {% endfor %} |
715 {% endif %} | 713 {% endif %} |
716 {%- endmacro %} | 714 {%- endmacro %} |
OLD | NEW |