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

Unified Diff: ppapi/proxy/ppb_video_decoder_proxy.cc

Issue 704913002: PPAPI: Make GetProxiedInterface not re-enter the plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make SimulateInputEvent test message asynchronous. Created 6 years, 1 month 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 | « ppapi/proxy/ppapi_proxy_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_video_decoder_proxy.cc
diff --git a/ppapi/proxy/ppb_video_decoder_proxy.cc b/ppapi/proxy/ppb_video_decoder_proxy.cc
index 7699c84ecaab1bc74a31defcc16d7f8d7045a459..8913c01624b37fdf7cabbbba1a7fea95fef42a61 100644
--- a/ppapi/proxy/ppb_video_decoder_proxy.cc
+++ b/ppapi/proxy/ppb_video_decoder_proxy.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
+#include "ppapi/c/dev/ppp_video_decoder_dev.h"
#include "ppapi/proxy/enter_proxy.h"
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -195,6 +196,14 @@ PP_Resource PPB_VideoDecoder_Proxy::CreateProxyResource(
if (!dispatcher->preferences().is_accelerated_video_decode_enabled)
return 0;
+ // We must get the plugin interface now, prior to doing Create synchronously.
+ // Otherwise, the browser will try to get the interface via a re-entrant
+ // sync message back to us, which would deadlock.
+ const std::string if_name = PPP_VIDEODECODER_DEV_INTERFACE_0_11;
+ if (!dispatcher->GetPluginInterface(if_name))
+ return 0;
+ dispatcher->Send(new PpapiHostMsg_PluginSupportsInterface(if_name));
piman 2014/11/06 23:52:38 This works, but mostly my thinking was that PPB_Vi
+
EnterResourceNoLock<PPB_Graphics3D_API> enter_context(graphics_context,
true);
if (enter_context.failed())
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698