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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/wrapper_class_declaration.tmpl

Issue 2754003005: Mojo C++ Bindings: fix mojom::Foo::Deserialize() for component build. (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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 %}
};

Powered by Google App Engine
This is Rietveld 408576698