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

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, 3 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
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% extends 'interface_base.cpp' %} 1 {% extends 'interface_base.cpp' %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% block constructor_getter %} 5 {% block constructor_getter %}
6 {% if has_constructor_attributes %} 6 {% if has_constructor_attributes %}
7 static void {{cpp_class}}ConstructorGetter(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Value>& info) 7 static void {{cpp_class}}ConstructorGetter(v8::Local<v8::String>, const v8::Prop ertyCallbackInfo<v8::Value>& info)
8 { 8 {
9 v8::Handle<v8::Value> data = info.Data(); 9 v8::Handle<v8::Value> data = info.Data();
10 ASSERT(data->IsExternal()); 10 ASSERT(data->IsExternal());
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 '%sV8Internal::namedPropertyQueryCallback' % cpp_class 912 '%sV8Internal::namedPropertyQueryCallback' % cpp_class
913 if named_property_getter.is_enumerable else '0' %} 913 if named_property_getter.is_enumerable else '0' %}
914 {% set named_property_deleter_callback = 914 {% set named_property_deleter_callback =
915 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class 915 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class
916 if named_property_deleter else '0' %} 916 if named_property_deleter else '0' %}
917 {% set named_property_enumerator_callback = 917 {% set named_property_enumerator_callback =
918 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class 918 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class
919 if named_property_getter.is_enumerable else '0' %} 919 if named_property_getter.is_enumerable else '0' %}
920 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}}); 920 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}});
921 {% endif %} 921 {% endif %}
922 {% if iterator_method %}
923 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class}}V8Internal::itera torMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
924 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate);
925 {% endif %}
922 {# End special operations #} 926 {# End special operations #}
923 {% if has_custom_legacy_call_as_function %} 927 {% if has_custom_legacy_call_as_function %}
924 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom); 928 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}: :legacyCallCustom);
925 {% endif %} 929 {% endif %}
926 {% if interface_name == 'HTMLAllCollection' %} 930 {% if interface_name == 'HTMLAllCollection' %}
927 {# Needed for legacy support of document.all #} 931 {# Needed for legacy support of document.all #}
928 functionTemplate->InstanceTemplate()->MarkAsUndetectable(); 932 functionTemplate->InstanceTemplate()->MarkAsUndetectable();
929 {% endif %} 933 {% endif %}
930 {% for method in custom_registration_methods %} 934 {% for method in custom_registration_methods %}
931 {# install_custom_signature #} 935 {# install_custom_signature #}
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 {% endif %} 1267 {% endif %}
1264 } 1268 }
1265 1269
1266 template<> 1270 template<>
1267 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 1271 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
1268 { 1272 {
1269 return toV8(impl, creationContext, isolate); 1273 return toV8(impl, creationContext, isolate);
1270 } 1274 }
1271 1275
1272 {% endblock %} 1276 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698