| Index: third_party/WebKit/Source/modules/sensor/SensorReading.cpp
|
| diff --git a/third_party/WebKit/Source/modules/sensor/SensorReading.cpp b/third_party/WebKit/Source/modules/sensor/SensorReading.cpp
|
| index 12c14881bc9af7be3a74f93e364ea500abd8c641..dddf6cd4c4b2fea8334a9413e471ea216c46c846 100644
|
| --- a/third_party/WebKit/Source/modules/sensor/SensorReading.cpp
|
| +++ b/third_party/WebKit/Source/modules/sensor/SensorReading.cpp
|
| @@ -14,7 +14,6 @@ namespace blink {
|
| SensorReading::SensorReading(SensorProxy* sensorProxy)
|
| : m_sensorProxy(sensorProxy)
|
| {
|
| - DCHECK(m_sensorProxy);
|
| }
|
|
|
| DEFINE_TRACE(SensorReading)
|
| @@ -22,6 +21,13 @@ DEFINE_TRACE(SensorReading)
|
| visitor->trace(m_sensorProxy);
|
| }
|
|
|
| +SensorReading::~SensorReading() = default;
|
| +
|
| +bool SensorReading::isReadingUpdated(const SensorProxy::Reading& previous) const
|
| +{
|
| + return false;
|
| +}
|
| +
|
| DOMHighResTimeStamp SensorReading::timeStamp(ScriptState* scriptState) const
|
| {
|
| LocalDOMWindow* window = scriptState->domWindow();
|
| @@ -31,6 +37,9 @@ DOMHighResTimeStamp SensorReading::timeStamp(ScriptState* scriptState) const
|
| Performance* performance = DOMWindowPerformance::performance(*window);
|
| DCHECK(performance);
|
|
|
| + if (!m_sensorProxy)
|
| + return performance->now();
|
| +
|
| return performance->monotonicTimeToDOMHighResTimeStamp(m_sensorProxy->reading().timestamp);
|
| }
|
|
|
|
|