Chromium Code Reviews| Index: mojo/public/c/system/message_pipe.h |
| diff --git a/mojo/public/c/system/message_pipe.h b/mojo/public/c/system/message_pipe.h |
| index d41e107a9922b5442957fce5219b7f57cdff7455..b9aca2887778f9bdd3768a476eaf686d5c163d01 100644 |
| --- a/mojo/public/c/system/message_pipe.h |
| +++ b/mojo/public/c/system/message_pipe.h |
| @@ -313,6 +313,21 @@ MOJO_SYSTEM_EXPORT MojoResult MojoFreeMessage(MojoMessageHandle message); |
| MOJO_SYSTEM_EXPORT MojoResult MojoGetMessageBuffer(MojoMessageHandle message, |
| void** buffer); // Out |
| +// Notifies the system that a bad message was received on a message pipe, |
| +// according to whatever criteria the caller chooses. This ultimately notifies |
| +// the embedder about the bad message, and the embedder may enforce some policy |
| +// for dealing with the source of the message (e.g. close the pipe, terminate |
| +// a process, etc.) |
| +// |
| +// |message|: The message to report as bad. This must have come from a call to |
| +// |MojoReadMessageNew()|. |
| +// |
| +// Returns: |
| +// |MOJO_RESULT_OK| if successful. |
| +// |MOJO_RESULT_INVALID_ARGUMENT| if |message| is not a valid message. |
|
Anand Mistry (off Chromium)
2016/06/10 10:28:20
Add a note that the bad message callback may not b
|
| +MOJO_SYSTEM_EXPORT MojoResult |
| +MojoNotifyBadMessage(MojoMessageHandle message); |
| + |
| #ifdef __cplusplus |
| } // extern "C" |
| #endif |