Index: third_party/WebKit/Source/modules/sensor/Sensor.cpp |
diff --git a/third_party/WebKit/Source/modules/sensor/Sensor.cpp b/third_party/WebKit/Source/modules/sensor/Sensor.cpp |
index 60551e7edd45e22c1090aaf8f1f05beec2d6fa4a..d8b3f6132dd2319b35f2794caac67c1db26d332b 100644 |
--- a/third_party/WebKit/Source/modules/sensor/Sensor.cpp |
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.cpp |
@@ -167,8 +167,11 @@ void Sensor::initSensorProxyIfNeeded() { |
m_sensorProxy = provider->getSensor(m_type); |
if (!m_sensorProxy) { |
- m_sensorProxy = |
- provider->createSensor(m_type, createSensorReadingFactory()); |
+ m_sensorProxy = provider->createSensor(m_type, getExecutionContext(), |
+ createSensorReadingFactory()); |
+ // check if proxy was created correctly. |
+ if (!m_sensorProxy) |
shalamov
2016/11/18 13:17:45
This is sync operation that is initiated from Sens
riju_
2016/11/21 11:23:28
Done.
|
+ reportError(NotAllowedError, "Could not create sensor proxy."); |
} |
} |