| Index: mojo/public/cpp/bindings/lib/validation_errors.h
|
| diff --git a/mojo/public/cpp/bindings/lib/validation_errors.h b/mojo/public/cpp/bindings/lib/validation_errors.h
|
| index 43059c2e22b8ee6c18a089b1381bbdf4df66edb2..953ab5ee380f30c9ddff6f09ac517bfd0288e296 100644
|
| --- a/mojo/public/cpp/bindings/lib/validation_errors.h
|
| +++ b/mojo/public/cpp/bindings/lib/validation_errors.h
|
| @@ -78,45 +78,13 @@ class ValidationErrorObserverForTesting {
|
| MOJO_DISALLOW_COPY_AND_ASSIGN(ValidationErrorObserverForTesting);
|
| };
|
|
|
| -// Used only by MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING. Don't use it directly.
|
| -//
|
| -// The function returns true if the error is recorded (by a
|
| -// SerializationWarningObserverForTesting object), false otherwise.
|
| -bool ReportSerializationWarning(ValidationError error);
|
| -
|
| -// Only used by serialization tests and when there is only one thread doing
|
| -// message serialization.
|
| -class SerializationWarningObserverForTesting {
|
| - public:
|
| - SerializationWarningObserverForTesting();
|
| - ~SerializationWarningObserverForTesting();
|
| -
|
| - ValidationError last_warning() const { return last_warning_; }
|
| - void set_last_warning(ValidationError error) { last_warning_ = error; }
|
| -
|
| - private:
|
| - ValidationError last_warning_;
|
| -
|
| - MOJO_DISALLOW_COPY_AND_ASSIGN(SerializationWarningObserverForTesting);
|
| -};
|
| -
|
| } // namespace internal
|
| } // namespace mojo
|
|
|
| -// In debug build, logs a serialization warning if |condition| evaluates to
|
| -// true:
|
| -// - if there is a SerializationWarningObserverForTesting object alive,
|
| -// records |error| in it;
|
| -// - otherwise, logs a fatal-level message.
|
| -// |error| is the validation error that will be triggered by the receiver
|
| -// of the serialzation result.
|
| -//
|
| -// In non-debug build, does nothing (not even compiling |condition|).
|
| -#define MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING( \
|
| - condition, error, description) \
|
| - MOJO_DLOG_IF(FATAL, (condition) && !ReportSerializationWarning(error)) \
|
| - << "The outgoing message will trigger " \
|
| - << ValidationErrorToString(error) << " at the receiving side (" \
|
| - << description << ").";
|
| +// In a debug build, logs a serialization warning.
|
| +#define MOJO_INTERNAL_DLOG_SERIALIZATION_WARNING(error, description) \
|
| + MOJO_DLOG(WARNING) << "The outgoing message will trigger " \
|
| + << ValidationErrorToString(error) \
|
| + << " at the receiving side (" << description << ")."
|
|
|
| #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_VALIDATION_ERRORS_H_
|
|
|