Chromium Code Reviews| Index: ppapi/proxy/ppb_instance_proxy.cc |
| diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc |
| index 373451237eb3dd105b87e54054757c6c5a144c3a..5f23e685995c2bb13ca74b2a0f5dd76630297fc0 100644 |
| --- a/ppapi/proxy/ppb_instance_proxy.cc |
| +++ b/ppapi/proxy/ppb_instance_proxy.cc |
| @@ -516,10 +516,15 @@ void PPB_Instance_Proxy::KeyError(PP_Instance instance, |
| void PPB_Instance_Proxy::DeliverBlock(PP_Instance instance, |
| PP_Resource decrypted_block, |
| const PP_DecryptedBlockInfo* block_info) { |
| - Resource* object = |
| - PpapiGlobals::Get()->GetResourceTracker()->GetResource(decrypted_block); |
| - if (!object || object->pp_instance() != instance) |
| - return; |
| + PP_Resource decrypted_block_host_resource = 0; |
| + |
| + if (decrypted_block) { |
| + Resource* object = |
| + PpapiGlobals::Get()->GetResourceTracker()->GetResource(decrypted_block); |
| + if (!object || object->pp_instance() != instance) |
| + return; |
| + decrypted_block_host_resource = object->host_resource().host_resource(); |
| + } |
| std::string serialized_block_info; |
| if (!SerializeBlockInfo(*block_info, &serialized_block_info)) |
| @@ -528,10 +533,11 @@ void PPB_Instance_Proxy::DeliverBlock(PP_Instance instance, |
| dispatcher()->Send( |
| new PpapiHostMsg_PPBInstance_DeliverBlock(API_ID_PPB_INSTANCE, |
| instance, |
| - object->host_resource().host_resource(), |
| + decrypted_block_host_resource, |
| serialized_block_info)); |
| } |
| +// TODO(tomfinegan): Handle null decrypted_frame after landing other patches. |
| void PPB_Instance_Proxy::DeliverFrame(PP_Instance instance, |
| PP_Resource decrypted_frame, |
| const PP_DecryptedFrameInfo* frame_info) { |
| @@ -551,6 +557,7 @@ void PPB_Instance_Proxy::DeliverFrame(PP_Instance instance, |
| serialized_block_info)); |
| } |
| +// TODO(tomfinegan): Handle null decrypted_frame after landing other patches. |
|
Tom Finegan
2012/10/11 23:57:56
s/decrypted_frame/decrypted_samples/
ddorwin
2012/10/12 00:21:16
Done.
|
| void PPB_Instance_Proxy::DeliverSamples( |
| PP_Instance instance, |
| PP_Resource decrypted_samples, |