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

Unified Diff: mojo/public/cpp/bindings/lib/connector.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 | « no previous file | mojo/public/cpp/bindings/lib/router.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/connector.h
diff --git a/mojo/public/cpp/bindings/lib/connector.h b/mojo/public/cpp/bindings/lib/connector.h
index 7c1d445a3d6ad7ad8a53e8bb3cc7d9f1d0290279..dfbd514aff20810f4b44dcae77005c2046d51f71 100644
--- a/mojo/public/cpp/bindings/lib/connector.h
+++ b/mojo/public/cpp/bindings/lib/connector.h
@@ -63,6 +63,9 @@ class Connector : public MessageReceiver {
// a quiescent state.
ScopedMessagePipeHandle PassMessagePipe();
+ // Is the connector bound to a MessagePipe handle?
+ bool is_valid() const { return message_pipe_.is_valid(); }
+
// Waits for the next message on the pipe, blocking until one arrives or an
// error happens. Returns |true| if a message has been delivered, |false|
// otherwise.
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698