Index: mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl |
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl |
index 24cc76725aec0243bfcfcaccccb4814d6dafa02f..5c14ea0da15179a91b67489f27c199c960cf6626 100644 |
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl |
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl |
@@ -16,14 +16,16 @@ void Serialize_({{struct.name}}Ptr input, mojo::internal::Buffer* buf, |
} |
} |
-void Deserialize_(internal::{{struct.name}}_Data* input, |
+bool Deserialize_(internal::{{struct.name}}_Data* input, |
{{struct.name}}Ptr* output, |
mojo::internal::SerializationContext* context) { |
+ bool success = true; |
if (input) { |
{{struct.name}}Ptr result({{struct.name}}::New()); |
- {{struct_macros.deserialize(struct, "input", "result->%s", "context")|indent(2)}} |
+ {{struct_macros.deserialize(struct, "input", "result->%s", "context", "success")|indent(2)}} |
*output = result.Pass(); |
} else { |
output->reset(); |
} |
+ return success; |
} |