Chromium Code Reviews| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 {% endif %} | 252 {% endif %} |
| 253 | 253 |
| 254 v8ConstructorAttributeGetter(property, info); | 254 v8ConstructorAttributeGetter(property, info); |
| 255 } | 255 } |
| 256 {% endmacro %} | 256 {% endmacro %} |
| 257 | 257 |
| 258 | 258 |
| 259 {##############################################################################} | 259 {##############################################################################} |
| 260 {% macro attribute_setter(attribute, world_suffix) %} | 260 {% macro attribute_setter(attribute, world_suffix) %} |
| 261 static void {{attribute.name}}AttributeSetter{{world_suffix}}( | 261 static void {{attribute.name}}AttributeSetter{{world_suffix}}( |
| 262 {%- if attribute.is_data_type_property %} | 262 {%- if attribute.has_cross_origin_setter %} |
| 263 v8::Local<v8::Value> v8Value, const V8CrossOriginSetterInfo& info | |
| 264 {%- elif attribute.is_data_type_property %} | |
| 263 v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info | 265 v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info |
| 264 {%- else %} | 266 {%- else %} |
| 265 v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info | 267 v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info |
| 266 {%- endif %}) { | 268 {%- endif %}) { |
| 267 {% filter format_remove_duplicates(['ExceptionState exceptionState']) %} | 269 {% filter format_remove_duplicates(['ExceptionState exceptionState']) %} |
| 268 {% set define_exception_state -%} | 270 {% set define_exception_state -%} |
| 269 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext , "{{interface_name}}", "{{attribute.name}}"); | 271 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext , "{{interface_name}}", "{{attribute.name}}"); |
| 270 {%- endset %} | 272 {%- endset %} |
| 271 | 273 |
| 272 {% if attribute.is_lenient_this %} | 274 {% if attribute.is_lenient_this %} |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 405 {% if attribute.is_ce_reactions %} | 407 {% if attribute.is_ce_reactions %} |
| 406 CEReactionsScope ceReactionsScope; | 408 CEReactionsScope ceReactionsScope; |
| 407 {% endif %} | 409 {% endif %} |
| 408 | 410 |
| 409 {% if attribute.is_custom_element_callbacks or attribute.is_reflect %} | 411 {% if attribute.is_custom_element_callbacks or attribute.is_reflect %} |
| 410 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 412 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| 411 {% endif %} | 413 {% endif %} |
| 412 | 414 |
| 413 {% if attribute.has_custom_setter %} | 415 {% if attribute.has_custom_setter %} |
| 414 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(v8Value, info); | 416 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(v8Value, info); |
| 417 {% elif attribute.has_cross_origin_setter %} | |
| 418 {{cpp_class_or_partial}}V8Internal::{{attribute.name}}AttributeSetter{{world_s uffix}}(v8Value, V8CrossOriginSetterInfo(info.GetIsolate(), info.Holder())); | |
|
haraken
2016/12/08 08:21:02
You don't need to support {{world_suffix}} since [
dcheng
2016/12/08 09:04:10
Done.
| |
| 415 {% else %} | 419 {% else %} |
| 416 {{cpp_class_or_partial}}V8Internal::{{attribute.name}}AttributeSetter{{world_s uffix}}(v8Value, info); | 420 {{cpp_class_or_partial}}V8Internal::{{attribute.name}}AttributeSetter{{world_s uffix}}(v8Value, info); |
| 417 {% endif %} | 421 {% endif %} |
| 418 } | 422 } |
| 419 {% endmacro %} | 423 {% endmacro %} |
| 420 | 424 |
| 421 | 425 |
| 422 {##############################################################################} | 426 {##############################################################################} |
| 423 {% macro attribute_getter_implemented_in_private_script(attribute) %} | 427 {% macro attribute_getter_implemented_in_private_script(attribute) %} |
| 424 bool {{v8_class}}::PrivateScript::{{attribute.name}}AttributeGetter(LocalFrame* frame, {{cpp_class}}* holderImpl, {{attribute.cpp_type}}* result) { | 428 bool {{v8_class}}::PrivateScript::{{attribute.name}}AttributeGetter(LocalFrame* frame, {{cpp_class}}* holderImpl, {{attribute.cpp_type}}* result) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 cached_accessor_callback, | 525 cached_accessor_callback, |
| 522 wrapper_type_info, | 526 wrapper_type_info, |
| 523 access_control, | 527 access_control, |
| 524 property_attribute, | 528 property_attribute, |
| 525 only_exposed_to_private_script, | 529 only_exposed_to_private_script, |
| 526 property_location(attribute), | 530 property_location(attribute), |
| 527 holder_check, | 531 holder_check, |
| 528 ] %} | 532 ] %} |
| 529 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 533 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
| 530 {%- endmacro %} | 534 {%- endmacro %} |
| OLD | NEW |