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

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

Issue 267803008: Mojo: Force folks to handle the return value of MessageReceiver::Accept{WithResponder} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/message.h
diff --git a/mojo/public/cpp/bindings/message.h b/mojo/public/cpp/bindings/message.h
index 58001c612f810e11c7ffefb0b2859ee9f7869809..5653f05eb6022aaeeeb9e9a8bff1257fb5a6854e 100644
--- a/mojo/public/cpp/bindings/message.h
+++ b/mojo/public/cpp/bindings/message.h
@@ -83,7 +83,7 @@ class MessageReceiver {
// The receiver may mutate the given message. Returns true if the message
// was accepted and false otherwise, indicating that the message was invalid
// or malformed.
- virtual bool Accept(Message* message) = 0;
+ virtual bool Accept(Message* message) MOJO_WARN_UNUSED_RESULT = 0;
// A variant on Accept that registers a MessageReceiver (known as the
// responder) to handle the response message generated from the given
@@ -94,8 +94,8 @@ class MessageReceiver {
// |responder| and will delete it after calling |responder->Accept| or upon
// its own destruction.
//
- virtual bool AcceptWithResponder(Message* message,
- MessageReceiver* responder) = 0;
+ virtual bool AcceptWithResponder(
+ Message* message, MessageReceiver* responder) MOJO_WARN_UNUSED_RESULT = 0;
};
// Read a single message from the pipe and dispatch to the given receiver. The
« no previous file with comments | « no previous file | mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698