Index: mojo/public/cpp/bindings/lib/connector.cc |
diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc |
index f4bd4b5e46d0898b96f6a7235897aa67b7129651..32c10f2614691e0c7fd34260e615b87e26e7df6c 100644 |
--- a/mojo/public/cpp/bindings/lib/connector.cc |
+++ b/mojo/public/cpp/bindings/lib/connector.cc |
@@ -97,6 +97,17 @@ bool Connector::Accept(Message* message) { |
// of incoming messages before regarding the message pipe as closed. |
drop_writes_ = true; |
break; |
+ case MOJO_RESULT_BUSY: |
+ // We'd get a "busy" result if one of the message's handles is: |
+ // - |message_pipe_|'s own handle; |
+ // - simultaneously being used on another thread; or |
+ // - in a "busy" state that prohibits it from being transferred (e.g., |
+ // a data pipe handle in the middle of a two-phase read/write, |
+ // regardless of which thread that two-phase read/write is happening |
+ // on). |
+ // TODO(vtl): I wonder if this should be a |MOJO_DCHECK()|. |
+ MOJO_CHECK(false) << "Not reached: race condition or other bug"; |
yzshen1
2014/07/18 22:08:08
nit: other bug*s*. :)
|
+ return false; |
default: |
// This particular write was rejected, presumably because of bad input. |
// The pipe is not necessarily in a bad state. |