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

Unified Diff: ppapi/proxy/ppp_video_decoder_proxy.cc

Issue 10867018: Don't dispatch PPP_VideoDecoder_Dev methods with no decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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: ppapi/proxy/ppp_video_decoder_proxy.cc
diff --git a/ppapi/proxy/ppp_video_decoder_proxy.cc b/ppapi/proxy/ppp_video_decoder_proxy.cc
index 7648b7f6f37f793741f48e5099394757bf2cce1e..0f4bd25cf0d97fdebceafe75630f0310201cf2fa 100644
--- a/ppapi/proxy/ppp_video_decoder_proxy.cc
+++ b/ppapi/proxy/ppp_video_decoder_proxy.cc
@@ -125,6 +125,8 @@ void PPP_VideoDecoder_Proxy::OnMsgProvidePictureBuffers(
uint32_t texture_target) {
PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()->
PluginResourceForHostResource(decoder);
+ if (!plugin_decoder)
+ return;
CallWhileUnlocked(ppp_video_decoder_impl_->ProvidePictureBuffers,
decoder.instance(),
plugin_decoder,
@@ -137,6 +139,8 @@ void PPP_VideoDecoder_Proxy::OnMsgDismissPictureBuffer(
const HostResource& decoder, int32_t picture_id) {
PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()->
PluginResourceForHostResource(decoder);
+ if (!plugin_decoder)
+ return;
CallWhileUnlocked(ppp_video_decoder_impl_->DismissPictureBuffer,
decoder.instance(),
plugin_decoder,
@@ -147,6 +151,8 @@ void PPP_VideoDecoder_Proxy::OnMsgPictureReady(
const HostResource& decoder, const PP_Picture_Dev& picture) {
PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()->
PluginResourceForHostResource(decoder);
+ if (!plugin_decoder)
+ return;
CallWhileUnlocked(ppp_video_decoder_impl_->PictureReady,
decoder.instance(),
plugin_decoder,
@@ -157,6 +163,8 @@ void PPP_VideoDecoder_Proxy::OnMsgNotifyError(
const HostResource& decoder, PP_VideoDecodeError_Dev error) {
PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()->
PluginResourceForHostResource(decoder);
+ if (!plugin_decoder)
+ return;
CallWhileUnlocked(ppp_video_decoder_impl_->NotifyError,
decoder.instance(),
plugin_decoder,
« 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