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

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

Issue 2053333002: Fix race when HTMLMediaElement.play() is called just after pause(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.h b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
index 3aad6e757f7bc4a29ea1364cf6a359aa39d6ffd8..7166e16b7b77219112ef637d722341500351034d 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -478,12 +478,10 @@ private:
void scheduleResolvePlayPromises();
void scheduleRejectPlayPromises(ExceptionCode);
void scheduleNotifyPlaying();
-
- void resolvePlayPromises();
- // TODO(mlamouri): this is used for cancellable tasks because we can't pass
- // parameters.
- void rejectPlayPromises();
+ void resolveScheduledPlayPromises();
+ void rejectScheduledPlayPromises();
void rejectPlayPromises(ExceptionCode, const String&);
+ void rejectPlayPromisesInternal(ExceptionCode, const String&);
EnumerationHistogram& showControlsHistogram() const;
@@ -593,9 +591,11 @@ private:
Member<CueTimeline> m_cueTimeline;
- HeapVector<Member<ScriptPromiseResolver>> m_playResolvers;
+ HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolvers;
OwnPtr<CancellableTaskFactory> m_playPromiseResolveTask;
OwnPtr<CancellableTaskFactory> m_playPromiseRejectTask;
+ HeapVector<Member<ScriptPromiseResolver>> m_playPromiseResolveList;
+ HeapVector<Member<ScriptPromiseResolver>> m_playPromiseRejectList;
ExceptionCode m_playPromiseErrorCode;
// This is a weak reference, since m_audioSourceNode holds a reference to us.

Powered by Google App Engine
This is Rietveld 408576698