| 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 1e6c98b68e689b579c6f9730bd3d165a813bb550..6dbe8240277cff5274ef77c72ed51cfb1bc108cf 100644
|
| --- a/third_party/WebKit/Source/modules/sensor/Sensor.cpp
|
| +++ b/third_party/WebKit/Source/modules/sensor/Sensor.cpp
|
| @@ -64,12 +64,8 @@ Sensor::~Sensor() = default;
|
|
|
| void Sensor::start(ScriptState* scriptState, ExceptionState& exceptionState) {
|
| if (m_state != Sensor::SensorState::Idle &&
|
| - m_state != Sensor::SensorState::Errored) {
|
| - exceptionState.throwDOMException(
|
| - InvalidStateError,
|
| - "Cannot start because SensorState is not Idle or errored");
|
| + m_state != Sensor::SensorState::Errored)
|
| return;
|
| - }
|
|
|
| initSensorProxyIfNeeded();
|
|
|
| @@ -84,12 +80,8 @@ void Sensor::start(ScriptState* scriptState, ExceptionState& exceptionState) {
|
|
|
| void Sensor::stop(ScriptState*, ExceptionState& exceptionState) {
|
| if (m_state == Sensor::SensorState::Idle ||
|
| - m_state == Sensor::SensorState::Errored) {
|
| - exceptionState.throwDOMException(
|
| - InvalidStateError,
|
| - "Cannot stop because SensorState is either Idle or errored");
|
| + m_state == Sensor::SensorState::Errored)
|
| return;
|
| - }
|
|
|
| stopListening();
|
| }
|
|
|