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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/struct_destructor.tmpl

Issue 226263002: Mojo: Move mojo/public/bindings to mojo/public/tools/bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 {%- set class_name = struct.name ~ "_Data" %} 1 {%- set class_name = struct.name ~ "_Data" %}
2 {%- if struct|is_struct_with_handles %} 2 {%- if struct|is_struct_with_handles %}
3 static void {{class_name}}_Destructor(void* address) { 3 static void {{class_name}}_Destructor(void* address) {
4 {{class_name}}* data = static_cast<{{class_name}}*>(address); 4 {{class_name}}* data = static_cast<{{class_name}}*>(address);
5 {%- for pf in struct.packed.packed_fields %} 5 {%- for pf in struct.packed.packed_fields %}
6 {%- if pf.field.kind|is_handle_kind %} 6 {%- if pf.field.kind|is_handle_kind %}
7 (void) mojo::MakePassable(data->{{pf.field.name}}()).Pass(); 7 (void) mojo::MakePassable(data->{{pf.field.name}}()).Pass();
8 {%- endif %} 8 {%- endif %}
9 {%- endfor %} 9 {%- endfor %}
10 } 10 }
11 {%- endif %} 11 {%- endif %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698