Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp

Issue 2686503002: [Sensors] Return 'NotReadableError' exception if failed to find a sensor (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 226d9f7fabde0c646207577d81e715dd52dd257c..9fb52ad687eb5eb37acdfed54bcb74e71e354ac2 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
@@ -190,7 +190,8 @@ void SensorProxy::onSensorCreated(SensorInitParamsPtr params,
SensorClientRequest clientRequest) {
DCHECK_EQ(Initializing, m_state);
if (!params) {
- handleSensorError(NotFoundError, "Sensor is not present on the platform.");
+ handleSensorError(NotReadableError,
+ "Sensor is not present on the platform.");
return;
}
const size_t kReadBufferSize = sizeof(ReadingBuffer);
« no previous file with comments | « third_party/WebKit/LayoutTests/sensor/resources/generic-sensor-tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698