OLD | NEW |
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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 getter_callback_for_main_world, | 497 getter_callback_for_main_world, |
498 setter_callback_for_main_world, | 498 setter_callback_for_main_world, |
499 cached_accessor_callback, | 499 cached_accessor_callback, |
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 |
| 508 {##############################################################################} |
| 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 %} |
| 513 {% filter exposed(attribute.exposed_test) %} |
| 514 {% filter secure_context(attribute.secure_context_test) %} |
| 515 {% filter runtime_enabled(attribute.runtime_enabled_feature_name) %} |
| 516 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attrib
ute_configuration(attribute)}}; |
| 517 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), pro
totypeObject, interfaceObject, signature, accessorConfiguration); |
| 518 {% endfilter %}{# runtime_enabled #} |
| 519 {% endfilter %}{# secure_context #} |
| 520 {% endfilter %}{# exposed #} |
| 521 {% endfor %} |
| 522 {% endmacro %} |
OLD | NEW |