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

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

Issue 2347763002: [Blink, RemotePlayback] Reject the prompt() with OperationError if there's a pending promise for th… (Closed)
Patch Set: Addressed Mounir's comments Created 4 years, 3 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.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index d3c068511620f503cd454d8a48b6c819a81dba29..e7c6226cf13e243489847527eaeaae88e529f5e2 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -2201,14 +2201,14 @@ void HTMLMediaElement::pauseInternal()
void HTMLMediaElement::requestRemotePlayback()
{
- DCHECK(m_remoteRoutesAvailable);
- webMediaPlayer()->requestRemotePlayback();
+ if (webMediaPlayer())
+ webMediaPlayer()->requestRemotePlayback();
}
void HTMLMediaElement::requestRemotePlaybackControl()
{
- DCHECK(m_remoteRoutesAvailable);
- webMediaPlayer()->requestRemotePlaybackControl();
+ if (webMediaPlayer())
+ webMediaPlayer()->requestRemotePlaybackControl();
}
void HTMLMediaElement::closeMediaSource()

Powered by Google App Engine
This is Rietveld 408576698