[PATCH] Fix for concurrent rpc_method_invoke()
Gwenole Beauchesne
gb.public at free.fr
Sun Oct 5 22:09:03 UTC 2008
Hi,
Le 2 oct. 08 à 23:35, Gwenole Beauchesne a écrit :
> I will look into solution 2.
Finally, I changed my mind and went for solution 3. ;-)
Reminder of the problem:
- browser calls rpc_method_invoke() and waits for an MSG_ACK prior to
sending the arguments
- plugin can call rpc_method_invoke() at the same time
Thus, instead of the expected MSG_ACK, the browser gets a new
MSG_START message.
This strategy was useful as an optimization, both run-time and writing-
time (yes, the human using the API ;-)). It turned out to be a broken
approach as it permitted an unexpected foreign call from the plugin. I
(wrongly?) assumed that any NPN_*() function call from the plugin
shall be made from NPN context, i.e. "we get to call into an NPN_*()
function only if the plugin is executing code within an NPP_*()
function called by the browser". In practise, this is no longer true
with Flash 10 since the following functions can be called from a
timer: NPN_GetURLNotify(), NPN_UserAgent(), NPN_InvalidateRect().
Now, rpc_method_invoke() writes the method ID and its arguments in one
shot. This means the above-mentioned optimization vanishes. Though, it
might be reintroduced in V3 RPC protocol specification for a future
nspluginwrapper version.
Here is the patch I committed to SVN, along with testcases. It applies
on top of the previous patch I posted (to fix windowless mode).
Note that I have only tested with Firefox 3.1-snapshot and the latest
Flash 10 RC. More testing is welcome. Thanks.
Regards,
Gwenole.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: npw.rpc.v2.5.diff
Type: application/octet-stream
Size: 49381 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/nspluginwrapper-devel-list/attachments/20081006/bb52241f/attachment.obj>
-------------- next part --------------
More information about the Nspluginwrapper-devel-list
mailing list