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

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

Issue 2407013002: EME: Improve promise lifetime (Closed)
Patch Set: remove m_contextDestroyed 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/modules/encryptedmedia/MediaKeySystemAccess.cpp
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
index 6794efc865aace4962dd7f4e0536caef6bac8a94..4d8d5923ea86970ac00f11819398747e100a031b 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
@@ -46,6 +46,9 @@ class NewCdmResultPromise : public ContentDecryptionModuleResultPromise {
void completeWithContentDecryptionModule(
WebContentDecryptionModule* cdm) override {
// NOTE: Continued from step 2.8 of createMediaKeys().
xhwang 2016/10/13 19:29:59 empty line here since this is not specific to l.49
jrummell 2016/10/14 00:03:32 Done.
+ if (!isValidToFulfillPromise())
+ return;
xhwang 2016/10/13 19:29:59 ditto
jrummell 2016/10/14 00:03:32 We don't want to create the MediaKeys object if we
+
// 2.9. Let media keys be a new MediaKeys object.
MediaKeys* mediaKeys = MediaKeys::create(
getExecutionContext(), m_supportedSessionTypes, wrapUnique(cdm));

Powered by Google App Engine
This is Rietveld 408576698