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 f0ed3d8095b0b6f98af81ac24997d34f138ad836..e930490d6e17f30de0a88fb59bfecb10a52d4d89 100644 |
--- a/third_party/WebKit/Source/modules/sensor/Sensor.cpp |
+++ b/third_party/WebKit/Source/modules/sensor/Sensor.cpp |
@@ -6,7 +6,6 @@ |
#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 "core/timing/DOMWindowPerformance.h" |
@@ -279,10 +278,9 @@ void Sensor::updateState(Sensor::SensorState newState) { |
// so that the first reading update will be notified considering the given |
// frequency hint. |
m_lastUpdateTimestamp = WTF::monotonicallyIncreasingTime(); |
- getExecutionContext()->postTask( |
- TaskType::Sensor, BLINK_FROM_HERE, |
- createSameThreadTask(&Sensor::notifyOnActivate, |
- wrapWeakPersistent(this))); |
+ TaskRunnerHelper::get(TaskType::Sensor, getExecutionContext()) |
+ ->postTask(BLINK_FROM_HERE, WTF::bind(&Sensor::notifyOnActivate, |
+ wrapWeakPersistent(this))); |
} |
m_state = newState; |
@@ -295,9 +293,9 @@ void Sensor::reportError(ExceptionCode code, |
if (getExecutionContext()) { |
auto error = |
DOMException::create(code, sanitizedMessage, unsanitizedMessage); |
- getExecutionContext()->postTask( |
- TaskType::Sensor, BLINK_FROM_HERE, |
- createSameThreadTask(&Sensor::notifyError, wrapWeakPersistent(this), |
+ TaskRunnerHelper::get(TaskType::Sensor, getExecutionContext()) |
+ ->postTask(BLINK_FROM_HERE, |
+ WTF::bind(&Sensor::notifyError, wrapWeakPersistent(this), |
wrapPersistent(error))); |
} |
} |