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

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

Issue 1865933002: Fix race when HTMLMediaElement.play() is called just after pause(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 5c774d18b2084e949dc302288bedb5e6f34f3a69..7d4911c9ba09a966e826290e4a33b64ac047b271 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;
@@ -591,9 +589,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