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

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

Issue 1387993002: mojo::Serialize*_() calls now propogate/return validation errors. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fixed MOJO_DCHECK issues, removed SerializationWarningObserver & addressing trung's CL comments Created 5 years, 2 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/control_message_handler.cc
diff --git a/mojo/public/cpp/bindings/lib/control_message_handler.cc b/mojo/public/cpp/bindings/lib/control_message_handler.cc
index 0c4698273318675b8a6e245073dd61d978b6eac1..6cc9568e8b64a0f867c0b31ac919b7f537fad355 100644
--- a/mojo/public/cpp/bindings/lib/control_message_handler.cc
+++ b/mojo/public/cpp/bindings/lib/control_message_handler.cc
@@ -56,7 +56,10 @@ bool ControlMessageHandler::Run(Message* message,
ResponseMessageBuilder builder(kRunMessageId, size, message->request_id());
RunResponseMessageParams_Data* response_params = nullptr;
- Serialize_(response_params_ptr.get(), builder.buffer(), &response_params);
+ auto result =
+ Serialize_(response_params_ptr.get(), builder.buffer(), &response_params);
+ MOJO_DCHECK(result == VALIDATION_ERROR_NONE);
+
response_params->EncodePointersAndHandles(
builder.message()->mutable_handles());
bool ok = responder->Accept(builder.message());
« no previous file with comments | « mojo/public/cpp/bindings/lib/array_serialization.h ('k') | mojo/public/cpp/bindings/lib/control_message_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698