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

Unified Diff: ppapi/proxy/ppp_instance_proxy.cc

Issue 6260057: Fix reentrancy in HandleInputEvent by posting a task (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: just set_unblock(false) Created 9 years, 11 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_instance_proxy.cc
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index b2103a3a4eea38a4699e9c8a0da020ea6dcea221..4d5bb3dd4f6cdaba9ef3cf225dad51c82aa1f97a 100644
--- a/ppapi/proxy/ppp_instance_proxy.cc
+++ b/ppapi/proxy/ppp_instance_proxy.cc
@@ -57,9 +57,12 @@ void DidChangeFocus(PP_Instance instance, PP_Bool has_focus) {
PP_Bool HandleInputEvent(PP_Instance instance,
const PP_InputEvent* event) {
PP_Bool result = PP_FALSE;
- HostDispatcher::GetForInstance(instance)->Send(
- new PpapiMsg_PPPInstance_HandleInputEvent(INTERFACE_ID_PPP_INSTANCE,
- instance, *event, &result));
+ IPC::Message* msg = new PpapiMsg_PPPInstance_HandleInputEvent(
+ INTERFACE_ID_PPP_INSTANCE, instance, *event, &result);
+ // Make this message not unblock, to avoid re-entrancy problems when the
+ // plugin does a sync call to the renderer.
brettw 2011/02/02 05:00:08 Can you add something like: "This will force any s
+ msg->set_unblock(false);
+ HostDispatcher::GetForInstance(instance)->Send(msg);
return result;
}
« 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