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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 11348365: Encrypted Media: Allows empty key message to be fired. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update doc Created 8 years 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 | « ppapi/c/private/ppb_content_decryptor_private.h ('k') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index e8d07abadae6ae9065ed3c9d839061a61187525a..4e3282227cf0b5005c0ff266689b57ffab53205e 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -539,17 +539,22 @@ void PPB_Instance_Proxy::KeyMessage(PP_Instance instance,
PP_Var session_id,
PP_Resource message,
PP_Var default_url) {
- Resource* object =
- PpapiGlobals::Get()->GetResourceTracker()->GetResource(message);
- if (!object || object->pp_instance() != instance)
- return;
+ PP_Resource host_resource = 0;
+ if (message) {
+ Resource* object =
+ PpapiGlobals::Get()->GetResourceTracker()->GetResource(message);
+ if (!object || object->pp_instance() != instance)
+ return;
+ host_resource = object->host_resource().host_resource();
+ }
+
dispatcher()->Send(
new PpapiHostMsg_PPBInstance_KeyMessage(
API_ID_PPB_INSTANCE,
instance,
SerializedVarSendInput(dispatcher(), key_system),
SerializedVarSendInput(dispatcher(), session_id),
- object->host_resource().host_resource(),
+ host_resource,
SerializedVarSendInput(dispatcher(), default_url)));
}
« no previous file with comments | « ppapi/c/private/ppb_content_decryptor_private.h ('k') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698