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

Unified Diff: mojo/public/cpp/bindings/lib/pipe_control_message_handler.h

Issue 2064903002: Mojo: Report bindings validation errors via MojoNotifyBadMessage (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/pipe_control_message_handler.h
diff --git a/mojo/public/cpp/bindings/lib/pipe_control_message_handler.h b/mojo/public/cpp/bindings/lib/pipe_control_message_handler.h
index c42d0bae3d1e7ccd67062d858f1e321f56275087..962d3a3f161f580f0b28ba95b520255b89ea6bda 100644
--- a/mojo/public/cpp/bindings/lib/pipe_control_message_handler.h
+++ b/mojo/public/cpp/bindings/lib/pipe_control_message_handler.h
@@ -22,6 +22,10 @@ class PipeControlMessageHandler : public MessageReceiver {
PipeControlMessageHandlerDelegate* delegate);
~PipeControlMessageHandler() override;
+ // Sets the description for this handler. Used only when reporting validation
+ // errors.
+ void SetDescription(const std::string& description);
+
// NOTE: |message| must have passed message header validation.
static bool IsPipeControlMessage(const Message* message);
@@ -35,9 +39,10 @@ class PipeControlMessageHandler : public MessageReceiver {
private:
// |message| must have passed message header validation.
- bool Validate(const Message* message);
+ bool Validate(Message* message);
bool RunOrClosePipe(Message* message);
+ std::string description_;
PipeControlMessageHandlerDelegate* const delegate_;
SerializationContext context_;

Powered by Google App Engine
This is Rietveld 408576698