Index: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
index 9e6e46f19e66cc6021ebf26d77eae107333c49f1..7ad9b4e1bc3b2dc5ede948c53c3b0daff86cfd77 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl |
@@ -73,7 +73,7 @@ class {{export_attribute}} {{struct.name}} { |
UserType* output) { |
return mojo::internal::StructDeserializeImpl< |
{{struct.name}}::DataView, {{serialization_result_type}}>( |
- input, output); |
+ input, output, Validate); |
} |
{#--- Struct members #} |
@@ -83,8 +83,11 @@ class {{export_attribute}} {{struct.name}} { |
{{type}} {{name}}; |
{%- endfor %} |
-{%- if struct|contains_move_only_members %} |
private: |
+ static bool Validate(const void* data, |
+ mojo::internal::ValidationContext* validation_context); |
+ |
+{%- if struct|contains_move_only_members %} |
DISALLOW_COPY_AND_ASSIGN({{struct.name}}); |
{%- endif %} |
}; |