Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl

Issue 2880713002: Support combination of [OriginTrialEnabled] and [SecureContext] (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t o_local_cpp_value %} 1 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable, v8_value_t o_local_cpp_value %}
2 2
3 {##############################################################################} 3 {##############################################################################}
4 {% macro generate_method(method, world_suffix) %} 4 {% macro generate_method(method, world_suffix) %}
5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) { 5 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) {
6 {% filter format_remove_duplicates([ 6 {% filter format_remove_duplicates([
7 'ExceptionState exceptionState', 7 'ExceptionState exceptionState',
8 'ScriptState* scriptState = ']) %} 8 'ScriptState* scriptState = ']) %}
9 {% set define_exception_state -%} 9 {% set define_exception_state -%}
10 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon text, "{{interface_name}}", "{{method.name}}"); 10 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon text, "{{interface_name}}", "{{method.name}}");
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration [] = { 629 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration [] = {
630 {{method_configuration(method) | indent(2)}} 630 {{method_configuration(method) | indent(2)}}
631 }; 631 };
632 for (const auto& methodConfig : {{method.name}}MethodConfiguration) 632 for (const auto& methodConfig : {{method.name}}MethodConfiguration)
633 V8DOMConfiguration::InstallMethod(isolate, world, {{instance_template}}, {{pro totype_template}}, {{interface_template}}, {{signature}}, methodConfig); 633 V8DOMConfiguration::InstallMethod(isolate, world, {{instance_template}}, {{pro totype_template}}, {{interface_template}}, {{signature}}, methodConfig);
634 {%- endmacro %} 634 {%- endmacro %}
635 635
636 636
637 {######################################} 637 {######################################}
638 {% macro install_conditionally_enabled_methods() %} 638 {% macro install_conditionally_enabled_methods() %}
639 {% if methods | conditionally_exposed(is_partial) %} 639 {% for method in conditionally_enabled_methods %}
640 {% for method in methods | conditionally_exposed(is_partial) %}
641 {% filter secure_context(method.overloads.secure_context_test_all 640 {% filter secure_context(method.overloads.secure_context_test_all
642 if method.overloads else 641 if method.overloads else
643 method.secure_context_test) %} 642 method.secure_context_test) %}
644 {% filter exposed(method.overloads.exposed_test_all 643 {% filter exposed(method.overloads.exposed_test_all
645 if method.overloads else 644 if method.overloads else
646 method.exposed_test) %} 645 method.exposed_test) %}
647 {% filter runtime_enabled(method.overloads.runtime_enabled_all 646 {% filter runtime_enabled(method.overloads.runtime_enabled_all
648 if method.overloads else 647 if method.overloads else
649 method.runtime_enabled_feature_name) %} 648 method.runtime_enabled_feature_name) %}
650 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration [] = { 649 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration [] = {
651 {{method_configuration(method) | indent(2)}} 650 {{method_configuration(method) | indent(2)}}
652 }; 651 };
653 for (const auto& methodConfig : {{method.name}}MethodConfiguration) 652 for (const auto& methodConfig : {{method.name}}MethodConfiguration)
654 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), pro totypeObject, interfaceObject, signature, methodConfig); 653 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(), pro totypeObject, interfaceObject, signature, methodConfig);
655 {% endfilter %}{# runtime_enabled() #} 654 {% endfilter %}{# runtime_enabled() #}
656 {% endfilter %}{# exposed() #} 655 {% endfilter %}{# exposed() #}
657 {% endfilter %}{# secure_context() #} 656 {% endfilter %}{# secure_context() #}
658 {% endfor %} 657 {% endfor %}
659 {% endif %}
660 {%- endmacro %} 658 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698