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

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

Issue 2036623002: Validate map keys in C++ Mojo bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 7 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/validation_macros.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl
index 5dabf24d09af12ea3d0f7c9c94dd0ae8a7f72412..9aeb92a1cc3123172b4d8e74a3bfe08e40f16861 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl
@@ -27,7 +27,7 @@
}
{%- elif kind|is_map_kind %}
const mojo::internal::ArrayValidateParams {{name}}_validate_params(
- {{kind.value_kind|get_map_validate_params_ctor_args|indent(6)}});
+ {{kind|get_array_validate_params_ctor_args|indent(6)}});
if (!mojo::internal::ValidateMap({{field_expr}}, bounds_checker,
&{{name}}_validate_params)) {
return false;

Powered by Google App Engine
This is Rietveld 408576698