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

Unified Diff: device/usb/mojo/device_impl.cc

Issue 1925463002: Mojo: Make device/ to not rely on connecton error notification on message loop destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « device/usb/mojo/device_impl.h ('k') | device/usb/mojo/device_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mojo/device_impl.cc
diff --git a/device/usb/mojo/device_impl.cc b/device/usb/mojo/device_impl.cc
index dddf6815230d36c53aa83eff063d45a773f76c15..611ac096579550b0479ea1582613c95e32a2cc39 100644
--- a/device/usb/mojo/device_impl.cc
+++ b/device/usb/mojo/device_impl.cc
@@ -138,9 +138,9 @@ DeviceImpl::DeviceImpl(scoped_refptr<UsbDevice> device,
DCHECK(device_);
// This object owns itself and will be destroyed if,
// * the device is disconnected or
- // * the message pipe it is bound to is closed
+ // * the message pipe it is bound to is closed or the message loop is
+ // * destructed.
observer_.Add(device_.get());
- binding_.set_connection_error_handler([this]() { delete this; });
}
DeviceImpl::~DeviceImpl() {
« no previous file with comments | « device/usb/mojo/device_impl.h ('k') | device/usb/mojo/device_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698