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

Unified Diff: mojo/public/tools/bindings/generators/mojom_cpp_generator.py

Issue 469393004: Mojo: Add warning of invalid serialization results (in debug build). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/mojom_cpp_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
index 27c1b2bf5f8712f3c02d04a0483603ca001c634e..a07c70cde4d4ead43c820654f6c60f5af6013c9a 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -249,16 +249,16 @@ def GetArrayValidateParams(kind):
if mojom.IsStringKind(kind):
expected_num_elements = 0
- element_nullable = False
+ element_is_nullable = False
element_validate_params = "mojo::internal::NoValidateParams"
else:
expected_num_elements = generator.ExpectedArraySize(kind)
- element_nullable = mojom.IsNullableKind(kind.kind)
+ element_is_nullable = mojom.IsNullableKind(kind.kind)
element_validate_params = GetArrayValidateParams(kind.kind)
return "mojo::internal::ArrayValidateParams<%d, %s,\n%s> " % (
expected_num_elements,
- 'true' if element_nullable else 'false',
+ 'true' if element_is_nullable else 'false',
element_validate_params)
_HEADER_SIZE = 8
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698