The generated C++ bindings currently don't validate map keys. This means that invalid enum values in map keys aren't detected.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/29d59af2f65f5c8929521ba0f09e86ae75f26e63 commit 29d59af2f65f5c8929521ba0f09e86ae75f26e63 Author: tibell <tibell@chromium.org> Date: Mon Jun 06 00:40:55 2016 Validate map keys in C++ Mojo bindings BUG= 616649 TESTED=mojo_public_bindings_unittests Review-Url: https://codereview.chromium.org/2036623002 Cr-Commit-Position: refs/heads/master@{#397955} [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/cpp/bindings/lib/map_data_internal.h [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/cpp/bindings/lib/map_serialization.h [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/cpp/bindings/lib/validate_params.h [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/cpp/bindings/lib/validation_util.h [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/cpp/bindings/tests/map_unittest.cc [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/cpp/bindings/tests/union_unittest.cc [add] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd16_uknown_non_extensible_enum_map_key.data [add] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd16_uknown_non_extensible_enum_map_key.expected [add] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd16_uknown_non_extensible_enum_map_value.data [add] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd16_uknown_non_extensible_enum_map_value.expected [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl [modify] https://crrev.com/29d59af2f65f5c8929521ba0f09e86ae75f26e63/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec commit 34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec Author: tibell <tibell@chromium.org> Date: Mon Jun 06 02:08:17 2016 Mojo C++ bindings: rename ArrayValidateParams for clarity BUG= 616649 TESTED=mojo/edk/test:mojo_public_bindings_unittests Review-Url: https://codereview.chromium.org/2030873002 Cr-Commit-Position: refs/heads/master@{#397961} [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/array_internal.h [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/array_serialization.h [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/map_data_internal.h [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/map_serialization.h [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/native_struct_data.cc [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/native_struct_serialization.cc [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/validate_params.h [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/lib/validation_util.h [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/tests/array_common_test.h [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/tests/map_unittest.cc [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/tests/serialization_warning_unittest.cc [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/tests/union_unittest.cc [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/cpp/bindings/tests/wtf_types_unittest.cc [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/tools/bindings/generators/cpp_templates/struct_macros.tmpl [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_definition.tmpl [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/tools/bindings/generators/cpp_templates/validation_macros.tmpl [modify] https://crrev.com/34b7a3f0a2b1266cfa37fcc8a18a87ddfc623bec/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
Comment 1 by bugdroid1@chromium.org
, Jun 6 2016