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

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

Issue 1003773002: CPP bindings: DCHECK when a Callback is destructed without being invoked (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased again Created 5 years, 9 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 | « mojo/public/cpp/bindings/lib/connector.h ('k') | mojo/public/cpp/bindings/lib/router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/router.h
diff --git a/mojo/public/cpp/bindings/lib/router.h b/mojo/public/cpp/bindings/lib/router.h
index 8254babf27eee54e3b82c79cefa3a680bc89a27c..86b889796bcbfcad3c6b09aaf40956eb1f648ec9 100644
--- a/mojo/public/cpp/bindings/lib/router.h
+++ b/mojo/public/cpp/bindings/lib/router.h
@@ -24,7 +24,7 @@ class Router : public MessageReceiverWithResponder {
// Sets the receiver to handle messages read from the message pipe that do
// not have the kMessageIsResponse flag set.
- void set_incoming_receiver(MessageReceiverWithResponder* receiver) {
+ void set_incoming_receiver(MessageReceiverWithResponderStatus* receiver) {
incoming_receiver_ = receiver;
}
@@ -38,6 +38,9 @@ class Router : public MessageReceiverWithResponder {
// waiting to read from the pipe.
bool encountered_error() const { return connector_.encountered_error(); }
+ // Is the router bound to a MessagePipe handle?
+ bool is_valid() const { return connector_.is_valid(); }
+
void CloseMessagePipe() { connector_.CloseMessagePipe(); }
ScopedMessagePipeHandle PassMessagePipe() {
@@ -81,7 +84,7 @@ class Router : public MessageReceiverWithResponder {
FilterChain filters_;
Connector connector_;
SharedData<Router*> weak_self_;
- MessageReceiverWithResponder* incoming_receiver_;
+ MessageReceiverWithResponderStatus* incoming_receiver_;
ResponderMap responders_;
uint64_t next_request_id_;
bool testing_mode_;
« no previous file with comments | « mojo/public/cpp/bindings/lib/connector.h ('k') | mojo/public/cpp/bindings/lib/router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698