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

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

Issue 1685543002: Supports "class string" based on @@toStringTag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated test expectations. Created 4 years, 10 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplateForNamedPropertiesObjec t(v8::Isolate* isolate) 706 v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplateForNamedPropertiesObjec t(v8::Isolate* isolate)
707 { 707 {
708 v8::Local<v8::FunctionTemplate> parentTemplate = V8{{parent_interface}}::dom Template(isolate); 708 v8::Local<v8::FunctionTemplate> parentTemplate = V8{{parent_interface}}::dom Template(isolate);
709 709
710 v8::Local<v8::FunctionTemplate> namedPropertiesObjectFunctionTemplate = v8:: FunctionTemplate::New(isolate); 710 v8::Local<v8::FunctionTemplate> namedPropertiesObjectFunctionTemplate = v8:: FunctionTemplate::New(isolate);
711 namedPropertiesObjectFunctionTemplate->SetClassName(v8AtomicString(isolate, "{{interface_name}}Properties")); 711 namedPropertiesObjectFunctionTemplate->SetClassName(v8AtomicString(isolate, "{{interface_name}}Properties"));
712 namedPropertiesObjectFunctionTemplate->Inherit(parentTemplate); 712 namedPropertiesObjectFunctionTemplate->Inherit(parentTemplate);
713 713
714 v8::Local<v8::ObjectTemplate> namedPropertiesObjectTemplate = namedPropertie sObjectFunctionTemplate->PrototypeTemplate(); 714 v8::Local<v8::ObjectTemplate> namedPropertiesObjectTemplate = namedPropertie sObjectFunctionTemplate->PrototypeTemplate();
715 namedPropertiesObjectTemplate->SetInternalFieldCount({{v8_class}}::internalF ieldCount); 715 namedPropertiesObjectTemplate->SetInternalFieldCount({{v8_class}}::internalF ieldCount);
716 V8DOMConfiguration::setClassString(isolate, namedPropertiesObjectTemplate, " {{interface_name}}Properties");
716 {{install_named_property_handler('namedPropertiesObjectTemplate') | indent}} 717 {{install_named_property_handler('namedPropertiesObjectTemplate') | indent}}
717 718
718 return namedPropertiesObjectFunctionTemplate; 719 return namedPropertiesObjectFunctionTemplate;
719 } 720 }
720 721
721 {% endif %} 722 {% endif %}
722 {% endblock %} 723 {% endblock %}
723 724
724 725
725 {##############################################################################} 726 {##############################################################################}
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 946
946 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 947 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
947 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 948 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
948 { 949 {
949 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 950 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
950 } 951 }
951 952
952 {% endfor %} 953 {% endfor %}
953 {% endif %} 954 {% endif %}
954 {% endblock %} 955 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698