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

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

Issue 99323009: IDL compiler: [Constructor] argument types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Formatting Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/templates/methods.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 {% 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 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %}
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 122 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
123 {{cpp_class}}V8Internal::{{cpp_class}}OriginSafeMethodSetter(name, jsValue, info); 123 {{cpp_class}}V8Internal::{{cpp_class}}OriginSafeMethodSetter(name, jsValue, info);
124 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 124 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
125 } 125 }
126 126
127 {% endif %} 127 {% endif %}
128 {% endblock %} 128 {% endblock %}
129 129
130 130
131 {##############################################################################} 131 {##############################################################################}
132 {% from 'methods.cpp' import generate_argument %} 132 {% from 'methods.cpp' import generate_argument with context %}
133 {% block constructor %} 133 {% block constructor %}
134 {% if has_constructor %} 134 {% if has_constructor %}
135 {# FIXME: support overloading #} 135 {# FIXME: support overloading #}
136 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 136 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
137 { 137 {
138 {% if constructor_arguments %} 138 {% if constructor_arguments %}
139 {# FIXME: support optional arguments #} 139 {# FIXME: support optional arguments #}
140 {% set number_of_arguments = constructor_arguments|length %} 140 {% set number_of_arguments = constructor_arguments|length %}
141 {# FIXME: remove this UNLIKELY: constructors are heavy, so no difference. #} 141 {# FIXME: remove this UNLIKELY: constructors are heavy, so no difference. #}
142 if (UNLIKELY(info.Length() < {{number_of_arguments}})) { 142 if (UNLIKELY(info.Length() < {{number_of_arguments}})) {
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 fromInternalPointer(object)->deref(); 689 fromInternalPointer(object)->deref();
690 } 690 }
691 691
692 template<> 692 template<>
693 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 693 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
694 { 694 {
695 return toV8(impl, creationContext, isolate); 695 return toV8(impl, creationContext, isolate);
696 } 696 }
697 697
698 {% endblock %} 698 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698