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

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

Issue 48003002: IDL compiler: remove blank line for void methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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
OLDNEW
1 {##############################################################################} 1 {##############################################################################}
2 {% macro generate_method(method) %} 2 {% macro generate_method(method) %}
3 static void {{method.name}}Method(const v8::FunctionCallbackInfo<v8::Value>& arg s) 3 static void {{method.name}}Method(const v8::FunctionCallbackInfo<v8::Value>& arg s)
4 { 4 {
5 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(args.Holder()); 5 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(args.Holder());
6 {% if method.idl_type == 'void' %} 6 {% if method.idl_type == 'void' %}
7 {{method.cpp_value}}; 7 {{method.cpp_value}};
8
9 {% else %} 8 {% else %}
10 {{method.v8_set_return_value}}; 9 {{method.v8_set_return_value}};
11 {% endif %} 10 {% endif %}
12 return; 11 return;
13 } 12 }
14 {% endmacro %} 13 {% endmacro %}
15 14
16 15
17 {##############################################################################} 16 {##############################################################################}
18 {% macro method_callback(method) %} 17 {% macro method_callback(method) %}
19 static void {{method.name}}MethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& args) 18 static void {{method.name}}MethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& args)
20 { 19 {
21 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 20 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
22 {{cpp_class_name}}V8Internal::{{method.name}}Method(args); 21 {{cpp_class_name}}V8Internal::{{method.name}}Method(args);
23 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 22 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
24 } 23 }
25 {% endmacro %} 24 {% endmacro %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8SupportTestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698