Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| index b17a53a2ca6cd96c137b027b624f8128d17f453b..aa0f7cd877c6e3c62a7fe285f5c7d2734de32665 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| @@ -38,6 +38,7 @@ |
| #include "core/dom/ElementTraversal.h" |
| #include "core/dom/ElementVisibilityObserver.h" |
| #include "core/dom/Fullscreen.h" |
| +#include "core/dom/TaskRunnerHelper.h" |
| #include "core/dom/shadow/ShadowRoot.h" |
| #include "core/events/Event.h" |
| #include "core/frame/FrameView.h" |
| @@ -3880,8 +3881,8 @@ void HTMLMediaElement::scheduleResolvePlayPromises() { |
| if (m_playPromiseResolveTask->isPending()) |
| return; |
| - Platform::current()->currentThread()->getWebTaskRunner()->postTask( |
| - BLINK_FROM_HERE, m_playPromiseResolveTask->cancelAndCreate()); |
| + TaskRunnerHelper::get(TaskType::MediaElementEvent, getExecutionContext()) |
|
haraken
2016/10/13 13:19:38
Nit: document() is better than getExecutionContext
tzik
2016/10/14 04:15:22
Done.
|
| + ->postTask(BLINK_FROM_HERE, m_playPromiseResolveTask->cancelAndCreate()); |
| } |
| void HTMLMediaElement::scheduleRejectPlayPromises(ExceptionCode code) { |
| @@ -3905,8 +3906,8 @@ void HTMLMediaElement::scheduleRejectPlayPromises(ExceptionCode code) { |
| // TODO(mlamouri): because cancellable tasks can't take parameters, the |
| // error code needs to be saved. |
| m_playPromiseErrorCode = code; |
| - Platform::current()->currentThread()->getWebTaskRunner()->postTask( |
| - BLINK_FROM_HERE, m_playPromiseRejectTask->cancelAndCreate()); |
| + TaskRunnerHelper::get(TaskType::MediaElementEvent, getExecutionContext()) |
|
haraken
2016/10/13 13:19:38
Ditto.
tzik
2016/10/14 04:15:22
Done.
|
| + ->postTask(BLINK_FROM_HERE, m_playPromiseRejectTask->cancelAndCreate()); |
| } |
| void HTMLMediaElement::scheduleNotifyPlaying() { |