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

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp

Issue 2703993002: media: Resolve pending SetCdm() when WebMediaPlayerImpl is destructed (Closed)
Patch Set: add layout test Created 3 years, 10 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/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
index 44f9ad9f2d7c6c7569bee6e6f12091c126d97353..8fc5a0208be1454d2dfd6fb743b8f1a29677fd6f 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
@@ -69,7 +69,10 @@ class SetContentDecryptionModuleResult final
m_failureCallback(std::move(failure)) {}
// ContentDecryptionModuleResult implementation.
- void complete() override { (*m_successCallback)(); }
+ void complete() override {
+ DVLOG(EME_LOG_LEVEL) << __func__ << ": promise resolved.";
+ (*m_successCallback)();
+ }
void completeWithContentDecryptionModule(
WebContentDecryptionModule*) override {
@@ -98,6 +101,9 @@ class SetContentDecryptionModuleResult final
result.append(')');
}
+ DVLOG(EME_LOG_LEVEL) << __func__ << ": promise rejected with code " << code
+ << " and message: " << result.toString();
+
(*m_failureCallback)(WebCdmExceptionToExceptionCode(code),
result.toString());
}
@@ -338,7 +344,7 @@ ScriptPromise HTMLMediaElementEncryptedMedia::setMediaKeys(
MediaKeys* mediaKeys) {
HTMLMediaElementEncryptedMedia& thisElement =
HTMLMediaElementEncryptedMedia::from(element);
- DVLOG(EME_LOG_LEVEL) << __func__ << " current("
+ DVLOG(EME_LOG_LEVEL) << __func__ << ": current("
<< thisElement.m_mediaKeys.get() << "), new("
<< mediaKeys << ")";

Powered by Google App Engine
This is Rietveld 408576698