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

Unified Diff: mojo/public/cpp/system/message.h

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no bindings Created 4 years, 6 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
« no previous file with comments | « mojo/public/c/system/thunks.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/message.h
diff --git a/mojo/public/cpp/system/message.h b/mojo/public/cpp/system/message.h
index f9002e4c51aa5884e2be91ad94be0d360d0e3bb5..d4406ee808e86aed738b59b4a180cc66e5f3c70b 100644
--- a/mojo/public/cpp/system/message.h
+++ b/mojo/public/cpp/system/message.h
@@ -8,6 +8,7 @@
#include <limits>
#include "base/macros.h"
+#include "base/strings/string_piece.h"
#include "mojo/public/c/system/message_pipe.h"
#include "mojo/public/cpp/system/handle.h"
@@ -71,6 +72,12 @@ inline MojoResult GetMessageBuffer(MessageHandle message, void** buffer) {
return MojoGetMessageBuffer(message.value(), buffer);
}
+inline MojoResult NotifyBadMessage(MessageHandle message,
+ const base::StringPiece& error) {
+ DCHECK(message.is_valid());
+ return MojoNotifyBadMessage(message.value(), error.data(), error.size());
+}
+
} // namespace mojo
#endif // MOJO_PUBLIC_CPP_SYSTEM_MESSAGE_H_
« no previous file with comments | « mojo/public/c/system/thunks.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698