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

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

Issue 2595543003: Rename toV8(...) function in Blink to ToV8(...). (Closed)
Patch Set: Rebasing... Created 3 years, 11 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 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 v8SetReturnValueNull(info); 125 v8SetReturnValueNull(info);
126 return; 126 return;
127 } 127 }
128 {% endif %} 128 {% endif %}
129 129
130 {% if attribute.is_keep_alive_for_gc %} 130 {% if attribute.is_keep_alive_for_gc %}
131 // Keep the wrapper object for the return value alive as long as |this| 131 // Keep the wrapper object for the return value alive as long as |this|
132 // object is alive in order to save creation time of the wrapper object. 132 // object is alive in order to save creation time of the wrapper object.
133 if ({{attribute.cpp_value}} && DOMDataStore::setReturnValue{{world_suffix}}(in fo.GetReturnValue(), {{attribute.cpp_value}})) 133 if ({{attribute.cpp_value}} && DOMDataStore::setReturnValue{{world_suffix}}(in fo.GetReturnValue(), {{attribute.cpp_value}}))
134 return; 134 return;
135 v8::Local<v8::Value> v8Value(toV8({{attribute.cpp_value}}, holder, info.GetIso late())); 135 v8::Local<v8::Value> v8Value(ToV8({{attribute.cpp_value}}, holder, info.GetIso late()));
136 const char kKeepAliveKey[] = "KeepAlive#{{interface_name}}#{{attribute.name}}" ; 136 const char kKeepAliveKey[] = "KeepAlive#{{interface_name}}#{{attribute.name}}" ;
137 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), StringView(kKeepAliveKey, sizeof kKeepAliveKe y)), v8Value); 137 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), StringView(kKeepAliveKey, sizeof kKeepAliveKe y)), v8Value);
138 {% endif %} 138 {% endif %}
139 139
140 {% if world_suffix %} 140 {% if world_suffix %}
141 {{attribute.v8_set_return_value_for_main_world}}; 141 {{attribute.v8_set_return_value_for_main_world}};
142 {% else %} 142 {% else %}
143 {{attribute.v8_set_return_value}}; 143 {{attribute.v8_set_return_value}};
144 {% endif %} 144 {% endif %}
145 145
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 setter_callback_for_main_world, 467 setter_callback_for_main_world,
468 cached_accessor_callback, 468 cached_accessor_callback,
469 wrapper_type_info, 469 wrapper_type_info,
470 access_control, 470 access_control,
471 property_attribute, 471 property_attribute,
472 property_location(attribute), 472 property_location(attribute),
473 holder_check, 473 holder_check,
474 ] %} 474 ] %}
475 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} 475 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}}
476 {%- endmacro %} 476 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698