Index: mojo/system/proxy_message_pipe_endpoint.cc |
diff --git a/mojo/system/proxy_message_pipe_endpoint.cc b/mojo/system/proxy_message_pipe_endpoint.cc |
index ff8beb808348b86c661397cab41ed8d5c4818d85..a14fa965b136a6e6ae68a2a1bc4e1b3cc6f02f5a 100644 |
--- a/mojo/system/proxy_message_pipe_endpoint.cc |
+++ b/mojo/system/proxy_message_pipe_endpoint.cc |
@@ -20,7 +20,7 @@ ProxyMessagePipeEndpoint::ProxyMessagePipeEndpoint( |
} |
ProxyMessagePipeEndpoint::~ProxyMessagePipeEndpoint() { |
- DCHECK(!is_attached()); |
+ channel_endpoint_->DetachFromMessagePipe(); |
} |
MessagePipeEndpoint::Type ProxyMessagePipeEndpoint::GetType() const { |
@@ -28,9 +28,6 @@ MessagePipeEndpoint::Type ProxyMessagePipeEndpoint::GetType() const { |
} |
bool ProxyMessagePipeEndpoint::OnPeerClose() { |
- if (is_attached()) |
- Detach(); |
- |
return false; |
} |
@@ -44,16 +41,5 @@ void ProxyMessagePipeEndpoint::EnqueueMessage( |
<< "Failed to write enqueue message to channel"; |
} |
-void ProxyMessagePipeEndpoint::OnRemove() { |
- Detach(); |
-} |
- |
-void ProxyMessagePipeEndpoint::Detach() { |
- DCHECK(is_attached()); |
- |
- channel_endpoint_->DetachFromMessagePipe(); |
- channel_endpoint_ = nullptr; |
-} |
- |
} // namespace system |
} // namespace mojo |