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

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

Issue 2043713004: Mojo: Add NotifyBadMessage API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: mojo/public/cpp/bindings/lib/message_buffer.cc
diff --git a/mojo/public/cpp/bindings/lib/message_buffer.cc b/mojo/public/cpp/bindings/lib/message_buffer.cc
index 7a153647f8fab4f7ef7bc2ccca92fc37cc7a849e..5537152a03427bdf52a6449091118b6608f93078 100644
--- a/mojo/public/cpp/bindings/lib/message_buffer.cc
+++ b/mojo/public/cpp/bindings/lib/message_buffer.cc
@@ -61,5 +61,11 @@ void* MessageBuffer::Allocate(size_t delta) {
return static_cast<void*>(start);
}
+void MessageBuffer::NotifyBadMessage() {
+ DCHECK(message_.is_valid());
+ MojoResult result = mojo::NotifyBadMessage(message_.get());
+ DCHECK_EQ(result, MOJO_RESULT_OK);
+}
+
} // namespace internal
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698