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

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

Issue 2692343006: [Bindings] Declare signature and executionContext once (Closed)
Patch Set: Add a test Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 attribute_getter(attribute, world_suffix) %} 4 {% macro attribute_getter(attribute, world_suffix) %}
5 static void {{attribute.name}}AttributeGetter{{world_suffix}}( 5 static void {{attribute.name}}AttributeGetter{{world_suffix}}(
6 {%- if attribute.is_data_type_property %} 6 {%- if attribute.is_data_type_property %}
7 const v8::PropertyCallbackInfo<v8::Value>& info 7 const v8::PropertyCallbackInfo<v8::Value>& info
8 {%- else %} 8 {%- else %}
9 const v8::FunctionCallbackInfo<v8::Value>& info 9 const v8::FunctionCallbackInfo<v8::Value>& info
10 {%- endif %}) { 10 {%- endif %}) {
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 wrapper_type_info, 500 wrapper_type_info,
501 property_attribute, 501 property_attribute,
502 property_location(attribute), 502 property_location(attribute),
503 holder_check, 503 holder_check,
504 ] %} 504 ] %}
505 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} 505 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}}
506 {%- endmacro %} 506 {%- endmacro %}
507 507
508 {##############################################################################} 508 {##############################################################################}
509 {% macro install_conditionally_enabled_attributes_on_prototype() %} 509 {% macro install_conditionally_enabled_attributes_on_prototype() %}
510 ExecutionContext* executionContext = toExecutionContext(context);
511 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTempla te);
512 {% for attribute in attributes if (attribute.exposed_test or attribute.secure_co ntext_test) and attribute.on_prototype %} 510 {% for attribute in attributes if (attribute.exposed_test or attribute.secure_co ntext_test) and attribute.on_prototype %}
513 {% filter exposed(attribute.exposed_test) %} 511 {% filter exposed(attribute.exposed_test) %}
514 {% filter secure_context(attribute.secure_context_test) %} 512 {% filter secure_context(attribute.secure_context_test) %}
515 {% filter runtime_enabled(attribute.runtime_enabled_feature_name) %} 513 {% filter runtime_enabled(attribute.runtime_enabled_feature_name) %}
516 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attrib ute_configuration(attribute)}}; 514 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attrib ute_configuration(attribute)}};
517 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), pro totypeObject, interfaceObject, signature, accessorConfiguration); 515 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), pro totypeObject, interfaceObject, signature, accessorConfiguration);
518 {% endfilter %}{# runtime_enabled #} 516 {% endfilter %}{# runtime_enabled #}
519 {% endfilter %}{# secure_context #} 517 {% endfilter %}{# secure_context #}
520 {% endfilter %}{# exposed #} 518 {% endfilter %}{# exposed #}
521 {% endfor %} 519 {% endfor %}
522 {% endmacro %} 520 {% endmacro %}
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698