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

Unified Diff: mojo/public/cpp/bindings/lib/connector.cc

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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/connector.cc
diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc
index aa6c45ed94aab129992dbf485f8a6dbbe3c162c1..d9ce9d1988119cd9fe672b3b4a923e3cf68706bd 100644
--- a/mojo/public/cpp/bindings/lib/connector.cc
+++ b/mojo/public/cpp/bindings/lib/connector.cc
@@ -38,7 +38,17 @@ void Connector::CloseMessagePipe() {
Close(message_pipe_.Pass());
}
+ScopedMessagePipeHandle Connector::ReleaseMessagePipe() {
+ if (async_wait_id_) {
+ waiter_->CancelWait(waiter_, async_wait_id_);
+ async_wait_id_ = 0;
+ }
+ return message_pipe_.Pass();
+}
+
bool Connector::Accept(Message* message) {
+ assert(message_pipe_.is_valid());
+
if (error_)
return false;
@@ -99,7 +109,7 @@ void Connector::OnHandleReady(MojoResult result) {
}
if (error_ && error_handler_)
- error_handler_->OnError();
+ error_handler_->OnConnectionError();
}
void Connector::WaitToReadMore() {

Powered by Google App Engine
This is Rietveld 408576698