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

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: nits 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 | « media/crypto/aes_decryptor_unittest.cc ('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 9c69bbd30fc9701fa1443f6487fcd18823758332..fccab295caea96edb43f5e42fd233dd049ab1fa5 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -540,17 +540,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;
dmichael (off chromium) 2012/12/04 15:44:34 Accepting 0 for the PP_Resource is a change to you
xhwang 2012/12/04 18:33:37 Done.
+ 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 | « media/crypto/aes_decryptor_unittest.cc ('k') | webkit/media/crypto/ppapi/cdm_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698