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 53c7e9f3597fae81ededb1a03cacf3b82841a112..632019fd16533b364511841d5ef908032e34256b 100644 |
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp |
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp |
@@ -24,8 +24,7 @@ SensorProxy::SensorProxy(SensorType sensorType, |
m_provider(provider), |
m_clientBinding(this), |
m_state(SensorProxy::Uninitialized), |
- m_suspended(false), |
- m_maximumFrequency(0.0) {} |
+ m_suspended(false) {} |
SensorProxy::~SensorProxy() {} |
@@ -212,9 +211,12 @@ void SensorProxy::onSensorCreated(SensorInitParamsPtr params, |
handleSensorError(); |
return; |
} |
+ m_frequencyLimits.first = params->minimum_frequency; |
+ m_frequencyLimits.second = params->maximum_frequency; |
- m_maximumFrequency = params->maximum_frequency; |
- DCHECK(m_maximumFrequency <= SensorConfiguration::kMaxAllowedFrequency); |
+ DCHECK_GT(m_frequencyLimits.first, 0); |
+ DCHECK(m_frequencyLimits.first <= m_frequencyLimits.second); |
Reilly Grant (use Gerrit)
2017/02/22 18:40:15
DCHECK_GE
Mikhail
2017/02/23 12:42:34
Done.
|
+ DCHECK(m_frequencyLimits.second <= SensorConfiguration::kMaxAllowedFrequency); |
Reilly Grant (use Gerrit)
2017/02/22 18:40:15
DCHECK_GE
Mikhail
2017/02/23 12:42:34
Done.
|
auto errorCallback = |
WTF::bind(&SensorProxy::handleSensorError, wrapWeakPersistent(this), |