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 6c3ecc113b0d9808d4f9b4e197c446d1a978b5bf..bfc7005d5625c043e136f565603c8a469c3041c8 100644 |
--- a/third_party/WebKit/Source/modules/sensor/Sensor.cpp |
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.cpp |
@@ -7,6 +7,7 @@ |
#include "core/dom/Document.h" |
#include "core/dom/ExceptionCode.h" |
#include "core/dom/ExecutionContextTask.h" |
+#include "core/dom/TaskRunnerHelper.h" |
#include "core/inspector/ConsoleMessage.h" |
#include "device/generic_sensor/public/interfaces/sensor.mojom-blink.h" |
#include "modules/sensor/SensorErrorEvent.h" |
@@ -266,7 +267,7 @@ void Sensor::onSensorUpdateNotification() { |
if (getExecutionContext() && |
m_sensorProxy->sensorReading()->isReadingUpdated(m_storedData)) { |
getExecutionContext()->postTask( |
- BLINK_FROM_HERE, |
+ TaskType::Sensor, BLINK_FROM_HERE, |
createSameThreadTask(&Sensor::notifySensorReadingChanged, |
wrapWeakPersistent(this))); |
} |
@@ -281,8 +282,9 @@ void Sensor::updateState(Sensor::SensorState newState) { |
if (newState == SensorState::Activated && getExecutionContext()) { |
DCHECK_EQ(SensorState::Activating, m_state); |
getExecutionContext()->postTask( |
- BLINK_FROM_HERE, createSameThreadTask(&Sensor::notifyOnActivate, |
- wrapWeakPersistent(this))); |
+ TaskType::Sensor, BLINK_FROM_HERE, |
+ createSameThreadTask(&Sensor::notifyOnActivate, |
+ wrapWeakPersistent(this))); |
} |
m_state = newState; |
@@ -296,7 +298,7 @@ void Sensor::reportError(ExceptionCode code, |
auto error = |
DOMException::create(code, sanitizedMessage, unsanitizedMessage); |
getExecutionContext()->postTask( |
- BLINK_FROM_HERE, |
+ TaskType::Sensor, BLINK_FROM_HERE, |
createSameThreadTask(&Sensor::notifyError, wrapWeakPersistent(this), |
wrapPersistent(error))); |
} |