Index: mojo/public/cpp/bindings/associated_binding.h |
diff --git a/mojo/public/cpp/bindings/associated_binding.h b/mojo/public/cpp/bindings/associated_binding.h |
index 5c3764f5ee672b1518409cab20e80809a5ca3b2e..0a95da430e54ebb8b7d8f95fb4e669311b7fb0b4 100644 |
--- a/mojo/public/cpp/bindings/associated_binding.h |
+++ b/mojo/public/cpp/bindings/associated_binding.h |
@@ -127,15 +127,13 @@ class AssociatedBinding { |
// Closes the associated interface. Puts this object into a state where it can |
// be rebound. |
void Close() { |
- DCHECK(endpoint_client_); |
endpoint_client_.reset(); |
} |
// Similar to the method above, but also specifies a disconnect reason. |
void CloseWithReason(uint32_t custom_reason, const std::string& description) { |
- DCHECK(endpoint_client_); |
- endpoint_client_->control_message_proxy()->SendDisconnectReason( |
- custom_reason, description); |
+ if (endpoint_client_) |
+ endpoint_client_->CloseWithReason(custom_reason, description); |
Close(); |
} |