OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_ |
7 | 7 |
8 #include "mojo/public/cpp/system/macros.h" | 8 #include "mojo/public/cpp/system/macros.h" |
9 | 9 |
10 namespace mojo { | 10 namespace mojo { |
(...skipping 21 matching lines...) Expand all Loading... |
32 // size. | 32 // size. |
33 VALIDATION_ERROR_UNEXPECTED_ARRAY_HEADER, | 33 VALIDATION_ERROR_UNEXPECTED_ARRAY_HEADER, |
34 // An encoded handle is illegal. | 34 // An encoded handle is illegal. |
35 VALIDATION_ERROR_ILLEGAL_HANDLE, | 35 VALIDATION_ERROR_ILLEGAL_HANDLE, |
36 // A non-nullable handle field is set to invalid handle. | 36 // A non-nullable handle field is set to invalid handle. |
37 VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE, | 37 VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE, |
38 // An encoded pointer is illegal. | 38 // An encoded pointer is illegal. |
39 VALIDATION_ERROR_ILLEGAL_POINTER, | 39 VALIDATION_ERROR_ILLEGAL_POINTER, |
40 // A non-nullable pointer field is set to null. | 40 // A non-nullable pointer field is set to null. |
41 VALIDATION_ERROR_UNEXPECTED_NULL_POINTER, | 41 VALIDATION_ERROR_UNEXPECTED_NULL_POINTER, |
| 42 // An interface ID is illegal. |
| 43 VALIDATION_ERROR_ILLEGAL_INTERFACE_ID, |
| 44 // A non-nullable interface ID field is set to invalid. |
| 45 VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID, |
42 // |flags| in the message header is invalid. The flags are either | 46 // |flags| in the message header is invalid. The flags are either |
43 // inconsistent with one another, inconsistent with other parts of the | 47 // inconsistent with one another, inconsistent with other parts of the |
44 // message, or unexpected for the message receiver. For example the | 48 // message, or unexpected for the message receiver. For example the |
45 // receiver is expecting a request message but the flags indicate that | 49 // receiver is expecting a request message but the flags indicate that |
46 // the message is a response message. | 50 // the message is a response message. |
47 VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAGS, | 51 VALIDATION_ERROR_MESSAGE_HEADER_INVALID_FLAGS, |
48 // |flags| in the message header indicates that a request ID is required but | 52 // |flags| in the message header indicates that a request ID is required but |
49 // there isn't one. | 53 // there isn't one. |
50 VALIDATION_ERROR_MESSAGE_HEADER_MISSING_REQUEST_ID, | 54 VALIDATION_ERROR_MESSAGE_HEADER_MISSING_REQUEST_ID, |
51 // The |name| field in a message header contains an unexpected value. | 55 // The |name| field in a message header contains an unexpected value. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // | 117 // |
114 // In non-debug build, does nothing (not even compiling |condition|). | 118 // In non-debug build, does nothing (not even compiling |condition|). |
115 #define MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING( \ | 119 #define MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING( \ |
116 condition, error, description) \ | 120 condition, error, description) \ |
117 MOJO_DLOG_IF(FATAL, (condition) && !ReportSerializationWarning(error)) \ | 121 MOJO_DLOG_IF(FATAL, (condition) && !ReportSerializationWarning(error)) \ |
118 << "The outgoing message will trigger " \ | 122 << "The outgoing message will trigger " \ |
119 << ValidationErrorToString(error) << " at the receiving side (" \ | 123 << ValidationErrorToString(error) << " at the receiving side (" \ |
120 << description << ")."; | 124 << description << ")."; |
121 | 125 |
122 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_ | 126 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_ |
OLD | NEW |