Nested Sync IPC?

23 views
Skip to first unread message

Mike Pinkerton

unread,
Mar 1, 2010, 1:42:28 PM3/1/10
to Chromium-dev
I think I know the answer to this question already, but wanted to ask
just to be sure.

If I'm calling a synchronous IPC call, say from the renderer to a
plug-in, can the recipient turn around and send a synchronous IPC call
right back (for instance if the plug-in needs information to complete
the request from the renderer)? I'm betting it can't, but I've been
surprised about these things before :-)

If not, how do folks generally work around this kind of thing? Do we
have a preferred pattern?

Thanks!

--
Mike Pinkerton
Mac Weenie
pink...@google.com

John Abd-El-Malek

unread,
Mar 1, 2010, 1:49:09 PM3/1/10
to pink...@chromium.org, Chromium-dev
Hi, yes nested sync IPC calls are needed and supported.  When a caller is making a synchronous call, they dispatch any incoming sync calls. 

To be very precise, they dispatch any incoming IPC message with the "unblock" flag set.  Usually sync calls have that set, but to avoid reentrancy in some situations (when webkit is painting, and at the nearly the same time, the plugin asks it to do layout it gets very confused), the plugin process only sets that flag if there's a sync IPC lower in the callstack.


--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
   http://groups.google.com/a/chromium.org/group/chromium-dev

Reply all
Reply to author
Forward
0 new messages