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

Unified Diff: Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 1219753005: Only call finishLoad() if session actually loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: changes Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/Source/modules/encryptedmedia/MediaKeySession.cpp b/Source/modules/encryptedmedia/MediaKeySession.cpp
index fe6455f2c34928282cec98e2953e0d8fd265ae8e..5643743136fdb46a7b18b30371543d0a6f33856a 100644
--- a/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -271,15 +271,15 @@ public:
// ContentDecryptionModuleResult implementation.
virtual void completeWithSession(WebContentDecryptionModuleResult::SessionStatus status) override
{
- bool result = false;
switch (status) {
case WebContentDecryptionModuleResult::NewSession:
- result = true;
- break;
+ m_session->finishLoad();
+ resolve(true);
+ return;
case WebContentDecryptionModuleResult::SessionNotFound:
- result = false;
- break;
+ resolve(false);
+ return;
case WebContentDecryptionModuleResult::SessionAlreadyExists:
ASSERT_NOT_REACHED();
@@ -287,8 +287,7 @@ public:
return;
}
- m_session->finishLoad();
- resolve(result);
+ ASSERT_NOT_REACHED();
}
DEFINE_INLINE_TRACE()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698