Index: webkit/plugins/ppapi/ppb_video_decoder_impl.cc |
=================================================================== |
--- webkit/plugins/ppapi/ppb_video_decoder_impl.cc (revision 88104) |
+++ webkit/plugins/ppapi/ppb_video_decoder_impl.cc (working copy) |
@@ -59,9 +59,10 @@ |
scoped_refptr<PPB_VideoDecoder_Impl> decoder( |
Resource::GetAs<PPB_VideoDecoder_Impl>(video_decoder)); |
if (!decoder) |
- return PP_ERROR_BADRESOURCE; |
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE); |
- return decoder->Initialize(decoder_config, callback); |
+ int32_t result =decoder->Initialize(decoder_config, callback); |
piman
2011/06/07 17:32:14
nit: space after =
polina
2011/06/09 23:53:51
Done.
|
+ return MayForceCallback(callback, result); |
} |
PP_Bool IsVideoDecoder(PP_Resource resource) { |
@@ -74,9 +75,10 @@ |
scoped_refptr<PPB_VideoDecoder_Impl> decoder( |
Resource::GetAs<PPB_VideoDecoder_Impl>(decoder_id)); |
if (!decoder) |
- return PP_ERROR_BADRESOURCE; |
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE); |
- return decoder->Decode(bitstream_buffer, callback); |
+ int32_t result = decoder->Decode(bitstream_buffer, callback); |
+ return MayForceCallback(callback, result); |
} |
void AssignGLESBuffers(PP_Resource video_decoder, |
@@ -114,9 +116,9 @@ |
scoped_refptr<PPB_VideoDecoder_Impl> decoder( |
Resource::GetAs<PPB_VideoDecoder_Impl>(video_decoder)); |
if (!decoder) |
- return PP_ERROR_BADRESOURCE; |
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE); |
- return decoder->Flush(callback); |
+ return MayForceCallback(callback, decoder->Flush(callback)); |
} |
int32_t Abort(PP_Resource video_decoder, |
@@ -124,9 +126,9 @@ |
scoped_refptr<PPB_VideoDecoder_Impl> decoder( |
Resource::GetAs<PPB_VideoDecoder_Impl>(video_decoder)); |
if (!decoder) |
- return PP_ERROR_BADRESOURCE; |
+ return MayForceCallback(callback, PP_ERROR_BADRESOURCE); |
- return decoder->Abort(callback); |
+ return MayForceCallback(callback, decoder->Abort(callback)); |
} |
const PPB_VideoDecoder_Dev ppb_videodecoder = { |