| Index: device/usb/mojo/device_manager_impl.cc
|
| diff --git a/device/usb/mojo/device_manager_impl.cc b/device/usb/mojo/device_manager_impl.cc
|
| index 3836c9744b0aa73ba1573902ba3a6059bc400d6e..a498ff64321aa4a2075ed4e9d3fdfbd7ab3a5f68 100644
|
| --- a/device/usb/mojo/device_manager_impl.cc
|
| +++ b/device/usb/mojo/device_manager_impl.cc
|
| @@ -47,8 +47,8 @@ DeviceManagerImpl::DeviceManagerImpl(
|
| binding_(this, std::move(request)),
|
| weak_factory_(this) {
|
| // This object owns itself and will be destroyed if the message pipe it is
|
| - // bound to is closed or the UsbService is shut down.
|
| - binding_.set_connection_error_handler([this]() { delete this; });
|
| + // bound to is closed, the message loop is destructed, or the UsbService is
|
| + // shut down.
|
| observer_.Add(usb_service_);
|
| }
|
|
|
|
|