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

Unified Diff: webkit/media/crypto/ppapi/cdm_wrapper.cc

Issue 12079060: Allow a null initData for external CDMs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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: webkit/media/crypto/ppapi/cdm_wrapper.cc
diff --git a/webkit/media/crypto/ppapi/cdm_wrapper.cc b/webkit/media/crypto/ppapi/cdm_wrapper.cc
index 4385f51f1356786f9d2d5396bb70a3164ee09673..9c7fa56775d437efcf6bdfea338ff69bdd5bd86b 100644
--- a/webkit/media/crypto/ppapi/cdm_wrapper.cc
+++ b/webkit/media/crypto/ppapi/cdm_wrapper.cc
@@ -660,8 +660,9 @@ void CdmWrapper::AddKey(const std::string& session_id,
int key_size = key.ByteLength();
const uint8_t* init_data_ptr = static_cast<const uint8_t*>(init_data.Map());
int init_data_size = init_data.ByteLength();
+ PP_DCHECK(!init_data_ptr == !init_data_size);
- if (!key_ptr || key_size <= 0 || !init_data_ptr || init_data_size <= 0) {
+ if (!key_ptr || key_size <= 0) {
SendUnknownKeyError(key_system_, session_id);
return;
}
« 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