| Index: third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
|
| diff --git a/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp b/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
|
| index c04e065940004d6f215b10dbb863e467d8e5104d..34db10b792206656de45cf06de3e2fe340944cb3 100644
|
| --- a/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
|
| +++ b/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
|
| @@ -84,13 +84,11 @@ void OrientationSensor::populateMatrixInternal(Matrix* targetMatrix,
|
| "Target buffer must have at least 16 elements.");
|
| return;
|
| }
|
| - if (!isActivated()) {
|
| - exceptionState.throwDOMException(
|
| - InvalidStateError, "The sensor must be in 'connected' state.");
|
| + if (!canReturnReadings()) {
|
| + exceptionState.throwDOMException(NotReadableError,
|
| + "Sensor data is not available.");
|
| return;
|
| }
|
| - if (!canReturnReadings())
|
| - return;
|
|
|
| double x = readingValueUnchecked(0);
|
| double y = readingValueUnchecked(1);
|
|
|