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

Unified Diff: mojo/public/cpp/bindings/lib/multiplex_router.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/multiplex_router.h
diff --git a/mojo/public/cpp/bindings/lib/multiplex_router.h b/mojo/public/cpp/bindings/lib/multiplex_router.h
index c348c7d8954aed9e19d8f20e3346fa2f7e1bbb7b..b6896710aa8afacc0e6257dca734267e1772e91a 100644
--- a/mojo/public/cpp/bindings/lib/multiplex_router.h
+++ b/mojo/public/cpp/bindings/lib/multiplex_router.h
@@ -95,7 +95,7 @@ class MultiplexRouter
// Raises an error on the underlying message pipe. It disconnects the pipe
// and notifies all interfaces running on this pipe.
- void RaiseError();
+ void RaiseError(Result error);
std::unique_ptr<AssociatedGroup> CreateAssociatedGroup();
@@ -135,6 +135,9 @@ class MultiplexRouter
// Whether there are any associated interfaces running currently.
bool HasAssociatedEndpoints() const;
+ // Sets the master interface name. Used only for debugging information.
+ void SetMasterInterfaceName(const std::string& name);
+
// Sets this object to testing mode.
// In testing mode, the object doesn't disconnect the underlying message pipe
// when it receives unexpected or invalid messages.
@@ -162,7 +165,7 @@ class MultiplexRouter
~MultiplexRouter() override;
// MessageReceiver implementation:
- bool Accept(Message* message) override;
+ Result Accept(Message* message) override;
// PipeControlMessageHandlerDelegate implementation:
bool OnPeerAssociatedEndpointClosed(InterfaceId id) override;
@@ -223,7 +226,7 @@ class MultiplexRouter
void UpdateEndpointStateMayRemove(InterfaceEndpoint* endpoint,
EndpointStateUpdateType type);
- void RaiseErrorInNonTestingMode();
+ void RaiseErrorInNonTestingMode(Result error);
InterfaceEndpoint* FindOrInsertEndpoint(InterfaceId id, bool* inserted);

Powered by Google App Engine
This is Rietveld 408576698