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

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

Issue 483163003: Introduce ES6 iterator for DOM objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 {% macro attribute_configuration(attribute) %} 5 {% macro attribute_configuration(attribute) %}
6 {% set getter_callback = 6 {% set getter_callback =
7 '%sV8Internal::%sAttributeGetterCallback' % 7 '%sV8Internal::%sAttributeGetterCallback' %
8 (cpp_class, attribute.name) 8 (cpp_class, attribute.name)
9 if not attribute.constructor_type else 9 if not attribute.constructor_type else
10 ('%sV8Internal::%sConstructorGetterCallback' % 10 ('%sV8Internal::%sConstructorGetterCallback' %
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 '%sV8Internal::namedPropertyQueryCallback' % cpp_class 971 '%sV8Internal::namedPropertyQueryCallback' % cpp_class
972 if named_property_getter.is_enumerable else '0' %} 972 if named_property_getter.is_enumerable else '0' %}
973 {% set named_property_deleter_callback = 973 {% set named_property_deleter_callback =
974 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class 974 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class
975 if named_property_deleter else '0' %} 975 if named_property_deleter else '0' %}
976 {% set named_property_enumerator_callback = 976 {% set named_property_enumerator_callback =
977 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class 977 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class
978 if named_property_getter.is_enumerable else '0' %} 978 if named_property_getter.is_enumerable else '0' %}
979 functionTemplate->{{set_on_template}}()->SetNamedPropertyHandler({{named_pro perty_getter_callback}}, {{named_property_setter_callback}}, {{named_property_qu ery_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator _callback}}); 979 functionTemplate->{{set_on_template}}()->SetNamedPropertyHandler({{named_pro perty_getter_callback}}, {{named_property_setter_callback}}, {{named_property_qu ery_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator _callback}});
980 {% endif %} 980 {% endif %}
981 {% if is_iterable %}
982 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolIterat orConfiguration = { v8::Symbol::GetIterator, {{cpp_class}}V8Internal::symbol::it eratorMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts };
haraken 2014/08/21 16:15:58 You'll need to support iteratorMethodCallbackForMa
haraken 2014/08/21 16:15:58 Don't mix "SymbolKeyedMethodConfiguration" and "sy
yhirano 2014/08/25 06:09:26 Done.
983 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolIteratorConfiguration, isolate);
984 {% endif %}
981 {# End special operations #} 985 {# End special operations #}
982 {% if has_custom_legacy_call_as_function %} 986 {% if has_custom_legacy_call_as_function %}
983 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom); 987 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom);
984 {% endif %} 988 {% endif %}
985 {% if interface_name == 'HTMLAllCollection' %} 989 {% if interface_name == 'HTMLAllCollection' %}
986 {# Needed for legacy support of document.all #} 990 {# Needed for legacy support of document.all #}
987 functionTemplate->InstanceTemplate()->MarkAsUndetectable(); 991 functionTemplate->InstanceTemplate()->MarkAsUndetectable();
988 {% endif %} 992 {% endif %}
989 {% for method in custom_registration_methods %} 993 {% for method in custom_registration_methods %}
990 {# install_custom_signature #} 994 {# install_custom_signature #}
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 {% endif %} 1357 {% endif %}
1354 } 1358 }
1355 1359
1356 template<> 1360 template<>
1357 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 1361 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
1358 { 1362 {
1359 return toV8(impl, creationContext, isolate); 1363 return toV8(impl, creationContext, isolate);
1360 } 1364 }
1361 1365
1362 {% endblock %} 1366 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698