| OLD | NEW |
| 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value, check_origin_trial %} | 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value, check_origin_trial %} |
| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 v8SetReturnValueNull(info); | 100 v8SetReturnValueNull(info); |
| 101 return; | 101 return; |
| 102 } | 102 } |
| 103 {% endif %} | 103 {% endif %} |
| 104 {% if attribute.cached_attribute_validation_method %} | 104 {% if attribute.cached_attribute_validation_method %} |
| 105 v8::Local<v8::Value> v8Value({{attribute.cpp_value_to_v8_value}}); | 105 v8::Local<v8::Value> v8Value({{attribute.cpp_value_to_v8_value}}); |
| 106 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holde
r, propertyName, v8Value); | 106 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holde
r, propertyName, v8Value); |
| 107 {% endif %} | 107 {% endif %} |
| 108 {# v8SetReturnValue #} | 108 {# v8SetReturnValue #} |
| 109 {% if attribute.is_keep_alive_for_gc %} | 109 {% if attribute.is_keep_alive_for_gc %} |
| 110 if ({{attribute.cpp_value}} && DOMDataStore::setReturnValue{{world_suffix}}(
info.GetReturnValue(), {{attribute.cpp_value}}.get())) | 110 if ({{attribute.cpp_value}} && DOMDataStore::setReturnValue{{world_suffix}}(
info.GetReturnValue(), {{attribute.cpp_value}})) |
| 111 return; | 111 return; |
| 112 v8::Local<v8::Value> v8Value(toV8({{attribute.cpp_value}}.get(), holder, inf
o.GetIsolate())); | 112 v8::Local<v8::Value> v8Value(toV8({{attribute.cpp_value}}, holder, info.GetI
solate())); |
| 113 if (!v8Value.IsEmpty()) { | 113 if (!v8Value.IsEmpty()) { |
| 114 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "{{attribute.name}}"), v8Value); | 114 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), h
older, v8AtomicString(info.GetIsolate(), "{{attribute.name}}"), v8Value); |
| 115 {{attribute.v8_set_return_value}}; | 115 {{attribute.v8_set_return_value}}; |
| 116 } | 116 } |
| 117 {% elif world_suffix %} | 117 {% elif world_suffix %} |
| 118 {{attribute.v8_set_return_value_for_main_world}}; | 118 {{attribute.v8_set_return_value_for_main_world}}; |
| 119 {% else %} | 119 {% else %} |
| 120 {% if attribute.use_output_parameter_for_result %} | 120 {% if attribute.use_output_parameter_for_result %} |
| 121 {{attribute.cpp_type}} result; | 121 {{attribute.cpp_type}} result; |
| 122 {{attribute.cpp_value}}; | 122 {{attribute.cpp_value}}; |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 setter_callback_for_main_world, | 499 setter_callback_for_main_world, |
| 500 wrapper_type_info, | 500 wrapper_type_info, |
| 501 access_control, | 501 access_control, |
| 502 property_attribute, | 502 property_attribute, |
| 503 only_exposed_to_private_script, | 503 only_exposed_to_private_script, |
| 504 property_location(attribute), | 504 property_location(attribute), |
| 505 holder_check, | 505 holder_check, |
| 506 ] %} | 506 ] %} |
| 507 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 507 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
| 508 {%- endmacro %} | 508 {%- endmacro %} |
| OLD | NEW |