Index: mojo/public/cpp/bindings/lib/interface_endpoint_client.cc |
diff --git a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc |
index db34291a5363d7ecaff2bea57fad011873b2e146..a9eee86b6aa27ec93664b1937875287e68996ef2 100644 |
--- a/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc |
+++ b/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc |
@@ -159,15 +159,11 @@ InterfaceEndpointClient::InterfaceEndpointClient( |
handle_, this, task_runner_); |
if (expect_sync_requests) |
controller_->AllowWokenUpBySyncWatchOnSameThread(); |
- |
- base::MessageLoop::current()->AddDestructionObserver(this); |
} |
InterfaceEndpointClient::~InterfaceEndpointClient() { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- StopObservingIfNecessary(); |
- |
if (handle_.is_valid()) |
handle_.group_controller()->DetachEndpointClient(handle_); |
} |
@@ -351,17 +347,4 @@ bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) { |
} |
} |
-void InterfaceEndpointClient::StopObservingIfNecessary() { |
- if (!observing_message_loop_destruction_) |
- return; |
- |
- observing_message_loop_destruction_ = false; |
- base::MessageLoop::current()->RemoveDestructionObserver(this); |
-} |
- |
-void InterfaceEndpointClient::WillDestroyCurrentMessageLoop() { |
- StopObservingIfNecessary(); |
- NotifyError(base::nullopt); |
-} |
- |
} // namespace mojo |