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

Unified Diff: mojo/public/cpp/bindings/lib/validation_errors.cc

Issue 2188143002: Move generated Mojo C++ error reporting code out of line (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@before-sharing
Patch Set: Address review comments Created 4 years, 5 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/cpp/bindings/lib/validation_errors.cc
diff --git a/mojo/public/cpp/bindings/lib/validation_errors.cc b/mojo/public/cpp/bindings/lib/validation_errors.cc
index 90652de05fae51fadeb942b1589c56d674df1010..2d17d120d681552b8753c9262d8849af8f94d809 100644
--- a/mojo/public/cpp/bindings/lib/validation_errors.cc
+++ b/mojo/public/cpp/bindings/lib/validation_errors.cc
@@ -88,6 +88,17 @@ void ReportValidationError(ValidationContext* context,
}
}
+void ReportValidationErrorForMessage(
+ mojo::Message* message,
+ ValidationError error,
+ const char* description) {
+ ValidationContext validation_context(
+ message->data(), message->data_num_bytes(),
+ message->handles()->size(), message,
+ description);
+ ReportValidationError(&validation_context, error);
+}
+
ValidationErrorObserverForTesting::ValidationErrorObserverForTesting(
const base::Closure& callback)
: last_error_(VALIDATION_ERROR_NONE), callback_(callback) {

Powered by Google App Engine
This is Rietveld 408576698