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

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

Issue 71203007: IDL compiler: Sync Python to r162223 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {##############################################################################} 1 {##############################################################################}
2 {% macro generate_method(method, world_suffix) %} 2 {% macro generate_method(method, world_suffix) %}
3 {% filter conditional(method.conditional_string) %} 3 {% filter conditional(method.conditional_string) %}
4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 4 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
5 { 5 {
6 {% if method.name in ['addEventListener', 'removeEventListener'] %} 6 {% if method.name in ['addEventListener', 'removeEventListener'] %}
7 {{add_remove_event_listener_method(method.name) | indent}} 7 {{add_remove_event_listener_method(method.name) | indent}}
8 {% else %} 8 {% else %}
9 {% if method.number_of_required_arguments %} 9 {% if method.number_of_required_arguments %}
10 if (UNLIKELY(info.Length() < {{method.number_of_required_arguments}})) { 10 if (UNLIKELY(info.Length() < {{method.number_of_required_arguments}})) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 {{method.name}}{{method.overload_index}}Method{{world_suffix}}(info); 167 {{method.name}}{{method.overload_index}}Method{{world_suffix}}(info);
168 return; 168 return;
169 } 169 }
170 {% endfor %} 170 {% endfor %}
171 {% if overloads.minimum_number_of_required_arguments %} 171 {% if overloads.minimum_number_of_required_arguments %}
172 if (UNLIKELY(info.Length() < {{overloads.minimum_number_of_required_argument s}})) { 172 if (UNLIKELY(info.Length() < {{overloads.minimum_number_of_required_argument s}})) {
173 throwTypeError(ExceptionMessages::failedToExecute("{{overloads.name}}", "{{interface_name}}", ExceptionMessages::notEnoughArguments({{overloads.minimum_ number_of_required_arguments}}, info.Length())), info.GetIsolate()); 173 throwTypeError(ExceptionMessages::failedToExecute("{{overloads.name}}", "{{interface_name}}", ExceptionMessages::notEnoughArguments({{overloads.minimum_ number_of_required_arguments}}, info.Length())), info.GetIsolate());
174 return; 174 return;
175 } 175 }
176 {% endif %} 176 {% endif %}
177 throwUninformativeAndGenericTypeError(info.GetIsolate()); 177 throwTypeError(ExceptionMessages::failedToExecute("{{overloads.name}}", "{{i nterface_name}}", "No function was found that matched the signature provided."), info.GetIsolate());
178 } 178 }
179 {% endmacro %} 179 {% endmacro %}
180 180
181 181
182 {##############################################################################} 182 {##############################################################################}
183 {% macro method_callback(method, world_suffix) %} 183 {% macro method_callback(method, world_suffix) %}
184 {% filter conditional(method.conditional_string) %} 184 {% filter conditional(method.conditional_string) %}
185 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall backInfo<v8::Value>& info) 185 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall backInfo<v8::Value>& info)
186 { 186 {
187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
(...skipping 14 matching lines...) Expand all
202 {% endif %} 202 {% endif %}
203 {% if method.is_custom %} 203 {% if method.is_custom %}
204 {{v8_class_name}}::{{method.name}}MethodCustom(info); 204 {{v8_class_name}}::{{method.name}}MethodCustom(info);
205 {% else %} 205 {% else %}
206 {{cpp_class_name}}V8Internal::{{method.name}}Method{{world_suffix}}(info); 206 {{cpp_class_name}}V8Internal::{{method.name}}Method{{world_suffix}}(info);
207 {% endif %} 207 {% endif %}
208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 208 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
209 } 209 }
210 {% endfilter %} 210 {% endfilter %}
211 {% endmacro %} 211 {% endmacro %}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698