| Index: media/blink/webcontentdecryptionmodulesession_impl.cc
|
| diff --git a/media/blink/webcontentdecryptionmodulesession_impl.cc b/media/blink/webcontentdecryptionmodulesession_impl.cc
|
| index 643aa948d34179cb5b88594da1673318004cb67c..fe5ce7cc42499ae5df7c44789d90195d7265c05b 100644
|
| --- a/media/blink/webcontentdecryptionmodulesession_impl.cc
|
| +++ b/media/blink/webcontentdecryptionmodulesession_impl.cc
|
| @@ -116,6 +116,7 @@ void WebContentDecryptionModuleSessionImpl::initializeNewSession(
|
| size_t init_data_length,
|
| blink::WebEncryptedMediaSessionType session_type,
|
| blink::WebContentDecryptionModuleResult result) {
|
| + DCHECK(init_data);
|
| DCHECK(session_id_.empty());
|
|
|
| // Step 5 from https://w3c.github.io/encrypted-media/#generateRequest.
|
| @@ -135,8 +136,8 @@ void WebContentDecryptionModuleSessionImpl::initializeNewSession(
|
| }
|
|
|
| adapter_->InitializeNewSession(
|
| - eme_init_data_type, init_data,
|
| - base::saturated_cast<int>(init_data_length),
|
| + eme_init_data_type,
|
| + std::vector<uint8>(init_data, init_data + init_data_length),
|
| convertSessionType(session_type),
|
| scoped_ptr<NewSessionCdmPromise>(new NewSessionCdmResultPromise(
|
| result, adapter_->GetKeySystemUMAPrefix() + kGenerateRequestUMAName,
|
| @@ -180,7 +181,7 @@ void WebContentDecryptionModuleSessionImpl::update(
|
| DCHECK(response);
|
| DCHECK(!session_id_.empty());
|
| adapter_->UpdateSession(
|
| - session_id_, response, base::saturated_cast<int>(response_length),
|
| + session_id_, std::vector<uint8>(response, response + response_length),
|
| scoped_ptr<SimpleCdmPromise>(new CdmResultPromise<>(
|
| result, adapter_->GetKeySystemUMAPrefix() + kUpdateSessionUMAName)));
|
| }
|
|
|