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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2390073003: Use per-frame WebTaskRunner on HTMLMediaElement (Closed)
Patch Set: s/getExecutionContext()/&document()/ Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..25600b306c771438b5d837392825603875d81a14 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, &document())
+ ->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, &document())
+ ->postTask(BLINK_FROM_HERE, m_playPromiseRejectTask->cancelAndCreate());
}
void HTMLMediaElement::scheduleNotifyPlaying() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698