| Index: third_party/mojo/src/mojo/public/cpp/bindings/lib/validation_errors.h
|
| diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/validation_errors.h b/third_party/mojo/src/mojo/public/cpp/bindings/lib/validation_errors.h
|
| index 4facf6e809c9d557a360336a5a0a9c497585885e..fbba6b30488913dcd9d5f09e16066835970748fd 100644
|
| --- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/validation_errors.h
|
| +++ b/third_party/mojo/src/mojo/public/cpp/bindings/lib/validation_errors.h
|
| @@ -19,11 +19,11 @@ enum ValidationError {
|
| // objects.
|
| VALIDATION_ERROR_ILLEGAL_MEMORY_RANGE,
|
| // A struct header doesn't make sense, for example:
|
| - // - |num_bytes| is smaller than the size of the oldest version that we
|
| - // support.
|
| - // - |num_fields| is smaller than the field number of the oldest version that
|
| - // we support.
|
| - // - |num_bytes| and |num_fields| don't match.
|
| + // - |num_bytes| is smaller than the size of the struct header.
|
| + // - |num_bytes| and |version| don't match.
|
| + // TODO(yzshen): Consider splitting it into two different error codes. Because
|
| + // the former indicates someone is misbehaving badly whereas the latter could
|
| + // be due to an inappropriately-modified .mojom file.
|
| VALIDATION_ERROR_UNEXPECTED_STRUCT_HEADER,
|
| // An array header doesn't make sense, for example:
|
| // - |num_bytes| is smaller than the size of the header plus the size required
|
|
|