Index: content/renderer/pepper/content_decryptor_delegate.cc |
diff --git a/content/renderer/pepper/content_decryptor_delegate.cc b/content/renderer/pepper/content_decryptor_delegate.cc |
index 840efa42e90f2c40cacfd959689c4eef324ae8d0..48ea4de9fa5b9be605d34b59ae82ab4b5e26430b 100644 |
--- a/content/renderer/pepper/content_decryptor_delegate.cc |
+++ b/content/renderer/pepper/content_decryptor_delegate.cc |
@@ -625,6 +625,19 @@ bool ContentDecryptorDelegate::DecryptAndDecodeVideo( |
void ContentDecryptorDelegate::OnPromiseResolved(uint32 promise_id) { |
scoped_ptr<CdmPromise> promise = TakePromise(promise_id); |
+ |
+ // Special case due to http://crbug.com/408330. CDM is resolving LoadSession() |
+ // with this method when the session is not found. Instead it should call |
+ // PromiseResolvedWithSession(""), so emulate that here until 408330 is fixed. |
+ // TODO(jrummell): Remove this code when the CDM is updated. |
+ if (promise && |
+ promise->GetResolveParameterType() == media::CdmPromise::STRING_TYPE) { |
+ NewSessionCdmPromise* session_promise( |
+ static_cast<NewSessionCdmPromise*>(promise.get())); |
bbudge
2014/08/28 21:41:41
nit: The assignment syntax seems more common in Ch
jrummell
2014/08/28 21:52:24
Done (along with the other 2 similar instances).
|
+ session_promise->resolve(std::string()); |
+ return; |
+ } |
+ |
if (!promise || |
promise->GetResolveParameterType() != media::CdmPromise::VOID_TYPE) { |
NOTREACHED(); |