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

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

Issue 2228733002: Mojo C++ bindings: add test cases for union custom typemapping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@86_union_traits
Patch Set: Created 4 years, 4 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/union_serialization_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
index 606eda465e4371780d72b306cc2b07bd1c155f91..cb2ee3834be8471455aeb47e86babd1c3ebd88eb 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
@@ -72,7 +72,7 @@ struct Serializer<{{mojom_type}}Ptr, MaybeConstUserType> {
return size;
}
- static void Serialize({{mojom_type}}Ptr& input,
+ static void Serialize(MaybeConstUserType& input,
Buffer* buffer,
{{data_type}}** output,
bool inlined,
@@ -156,7 +156,7 @@ struct Serializer<{{mojom_type}}Ptr, MaybeConstUserType> {
}
static bool Deserialize({{data_type}}* input,
- {{mojom_type}}Ptr* output,
+ UserType* output,
SerializationContext* context) {
if (!input || input->is_null())
return CallSetToNullIfExists<Traits>(output);

Powered by Google App Engine
This is Rietveld 408576698