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()); |
} |