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

Unified Diff: device/generic_sensor/sensor_provider_impl.cc

Issue 2396873002: [sensors] Fix crash after 85cc22d when using async creation of sensors. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/generic_sensor/sensor_provider_impl.cc
diff --git a/device/generic_sensor/sensor_provider_impl.cc b/device/generic_sensor/sensor_provider_impl.cc
index 1b9035dd9ba158bb6c0b027abff5f1c0eb98c2ee..dc6e0fd68764b8c2adcf60b246d762fd04252d04 100644
--- a/device/generic_sensor/sensor_provider_impl.cc
+++ b/device/generic_sensor/sensor_provider_impl.cc
@@ -96,9 +96,9 @@ void SensorProviderImpl::SensorCreated(
init_params->mode = sensor->GetReportingMode();
init_params->default_configuration = sensor->GetDefaultConfiguration();
- mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request));
+ NotifySensorCreated(std::move(init_params), sensor_impl.get(), callback);
timvolodine 2016/10/05 17:59:35 is the order of Notify and MakeStrongBinding impor
- NotifySensorCreated(nullptr, nullptr, callback);
+ mojo::MakeStrongBinding(std::move(sensor_impl), std::move(sensor_request));
}
} // namespace device
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698