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

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

Issue 2043503002: Add [CEReactions] IDL attributes for Custom Elements V1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yukishiino review Created 4 years, 6 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 {% extends 'interface_base.cpp' %} 1 {% extends 'interface_base.cpp' %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% block indexed_property_getter %} 5 {% block indexed_property_getter %}
6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %}
7 {% set getter = indexed_property_getter %} 7 {% set getter = indexed_property_getter %}
8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
9 { 9 {
10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 {% endif %} 143 {% endif %}
144 {% endblock %} 144 {% endblock %}
145 145
146 146
147 {##############################################################################} 147 {##############################################################################}
148 {% block indexed_property_deleter_callback %} 148 {% block indexed_property_deleter_callback %}
149 {% if indexed_property_deleter %} 149 {% if indexed_property_deleter %}
150 {% set deleter = indexed_property_deleter %} 150 {% set deleter = indexed_property_deleter %}
151 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info) 151 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info)
152 { 152 {
153 {% if deleter.is_ce_reactions %}
154 CEReactionsScope ceReactionsScope;
155 {% endif %}
153 {% if deleter.is_custom %} 156 {% if deleter.is_custom %}
154 {{v8_class}}::indexedPropertyDeleterCustom(index, info); 157 {{v8_class}}::indexedPropertyDeleterCustom(index, info);
155 {% else %} 158 {% else %}
156 {{cpp_class}}V8Internal::indexedPropertyDeleter(index, info); 159 {{cpp_class}}V8Internal::indexedPropertyDeleter(index, info);
157 {% endif %} 160 {% endif %}
158 } 161 }
159 162
160 {% endif %} 163 {% endif %}
161 {% endblock %} 164 {% endblock %}
162 165
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 267 }
265 268
266 {% endif %} 269 {% endif %}
267 {% endblock %} 270 {% endblock %}
268 271
269 272
270 {##############################################################################} 273 {##############################################################################}
271 {% block named_property_setter_callback %} 274 {% block named_property_setter_callback %}
272 {% if named_property_setter %} 275 {% if named_property_setter %}
273 {% set setter = named_property_setter %} 276 {% set setter = named_property_setter %}
274 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 277 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
Yuki 2016/06/07 08:16:57 Why don't you add CEReactionsScope to setters? Not
kojii 2016/06/07 09:56:36 That was missed, thank you for catching!
275 { 278 {
276 if (!name->IsString()) 279 if (!name->IsString())
277 return; 280 return;
278 {% if setter.is_custom %} 281 {% if setter.is_custom %}
279 {{v8_class}}::namedPropertySetterCustom(name, v8Value, info); 282 {{v8_class}}::namedPropertySetterCustom(name, v8Value, info);
280 {% else %} 283 {% else %}
281 {{cpp_class}}V8Internal::namedPropertySetter(name, v8Value, info); 284 {{cpp_class}}V8Internal::namedPropertySetter(name, v8Value, info);
282 {% endif %} 285 {% endif %}
283 } 286 }
284 287
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 375
373 376
374 {##############################################################################} 377 {##############################################################################}
375 {% block named_property_deleter_callback %} 378 {% block named_property_deleter_callback %}
376 {% if named_property_deleter %} 379 {% if named_property_deleter %}
377 {% set deleter = named_property_deleter %} 380 {% set deleter = named_property_deleter %}
378 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro pertyCallbackInfo<v8::Boolean>& info) 381 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro pertyCallbackInfo<v8::Boolean>& info)
379 { 382 {
380 if (!name->IsString()) 383 if (!name->IsString())
381 return; 384 return;
385 {% if deleter.is_ce_reactions %}
386 CEReactionsScope ceReactionsScope;
387 {% endif %}
382 {% if deleter.is_custom %} 388 {% if deleter.is_custom %}
383 {{v8_class}}::namedPropertyDeleterCustom(name, info); 389 {{v8_class}}::namedPropertyDeleterCustom(name, info);
384 {% else %} 390 {% else %}
385 {{cpp_class}}V8Internal::namedPropertyDeleter(name, info); 391 {{cpp_class}}V8Internal::namedPropertyDeleter(name, info);
386 {% endif %} 392 {% endif %}
387 } 393 }
388 394
389 {% endif %} 395 {% endif %}
390 {% endblock %} 396 {% endblock %}
391 397
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 940
935 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 941 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
936 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 942 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
937 { 943 {
938 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 944 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
939 } 945 }
940 946
941 {% endfor %} 947 {% endfor %}
942 {% endif %} 948 {% endif %}
943 {% endblock %} 949 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698