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

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: Fixed the test 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
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 e9f9ba3a2b7fbdbf2ffd4e583e8cf446beea7d72..ad5bca511ef5d3cd7a0edfe224ddb3479282bc11 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -2194,13 +2194,13 @@ 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