diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 10:52:26 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 10:52:26 +0000 |
commit | b749fd663ab09e91c0e9d55af7ca929ba1f9704f (patch) | |
tree | 744e41010132e72b0e2b4fa0756f5b0c827a410d /ppapi/proxy/ppb_video_capture_proxy.cc | |
parent | e53d3ff360d9b38fd7c9469cfcad1554e989cbc1 (diff) | |
download | chromium_src-b749fd663ab09e91c0e9d55af7ca929ba1f9704f.zip chromium_src-b749fd663ab09e91c0e9d55af7ca929ba1f9704f.tar.gz chromium_src-b749fd663ab09e91c0e9d55af7ca929ba1f9704f.tar.bz2 |
PPAPI: Unlock when calling PPP_VideoCapture interface. Fixes Flash hang.
BUG=159240,160820
TBR=brettw
Review URL: https://chromiumcodereview.appspot.com/11377151
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167645 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_video_capture_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppb_video_capture_proxy.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ppapi/proxy/ppb_video_capture_proxy.cc b/ppapi/proxy/ppb_video_capture_proxy.cc index 7edfa50..4853e37 100644 --- a/ppapi/proxy/ppb_video_capture_proxy.cc +++ b/ppapi/proxy/ppb_video_capture_proxy.cc @@ -18,6 +18,7 @@ #include "ppapi/proxy/ppb_buffer_proxy.h" #include "ppapi/shared_impl/ppapi_globals.h" #include "ppapi/shared_impl/ppb_video_capture_shared.h" +#include "ppapi/shared_impl/proxy_lock.h" #include "ppapi/shared_impl/resource_tracker.h" #include "ppapi/shared_impl/tracked_callback.h" #include "ppapi/thunk/ppb_buffer_api.h" @@ -491,12 +492,12 @@ void PPP_VideoCapture_Proxy::OnMsgOnDeviceInfo( VideoCapture* capture = static_cast<VideoCapture*>(enter.object()); capture->SetBufferCount(buffers.size()); - ppp_video_capture_impl_->OnDeviceInfo( + CallWhileUnlocked(ppp_video_capture_impl_->OnDeviceInfo, host_resource.instance(), capture->pp_resource(), &info, - buffers.size(), - resources.get()); + static_cast<uint32_t>(buffers.size()), + const_cast<const PP_Resource*>(resources.get())); for (size_t i = 0; i < buffers.size(); ++i) tracker->ReleaseResource(resources[i]); } @@ -510,7 +511,7 @@ void PPP_VideoCapture_Proxy::OnMsgOnStatus(const HostResource& host_resource, VideoCapture* capture = static_cast<VideoCapture*>(enter.object()); if (!capture->OnStatus(static_cast<PP_VideoCaptureStatus_Dev>(status))) return; - ppp_video_capture_impl_->OnStatus( + CallWhileUnlocked(ppp_video_capture_impl_->OnStatus, host_resource.instance(), capture->pp_resource(), status); } @@ -522,7 +523,7 @@ void PPP_VideoCapture_Proxy::OnMsgOnError(const HostResource& host_resource, VideoCapture* capture = static_cast<VideoCapture*>(enter.object()); capture->set_status(PP_VIDEO_CAPTURE_STATUS_STOPPED); - ppp_video_capture_impl_->OnError( + CallWhileUnlocked(ppp_video_capture_impl_->OnError, host_resource.instance(), capture->pp_resource(), error_code); } @@ -534,7 +535,7 @@ void PPP_VideoCapture_Proxy::OnMsgOnBufferReady( VideoCapture* capture = static_cast<VideoCapture*>(enter.object()); capture->SetBufferInUse(buffer); - ppp_video_capture_impl_->OnBufferReady( + CallWhileUnlocked(ppp_video_capture_impl_->OnBufferReady, host_resource.instance(), capture->pp_resource(), buffer); } |