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

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp

Issue 2839963004: [Sensors] Error handler in Senor class should stop the platform sensor (Closed)
Patch Set: fix test failures Created 3 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 | « third_party/WebKit/Source/modules/sensor/Sensor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
index b90664646d597c238f39767dc9fc58147b8ff1ee..d7f8d9339d343c52bf2cd593a957056829f4fbf7 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
@@ -178,7 +178,8 @@ void SensorProxy::HandleSensorError() {
default_config_.reset();
client_binding_.Close();
- for (Observer* observer : observers_) {
+ auto copy = observers_;
+ for (Observer* observer : copy) {
observer->OnSensorError(kNotReadableError, "Could not connect to a sensor",
String());
}
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/Sensor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698