Simultaneous rpc calls
Benjamin Smedberg <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
What happens when both sides of a connection send a simultaneous rpc call, e.g.: Parent: Child: NPP_DestroyStream NPN_DestroyStream Part 1: How are the messages interleaved? Does this deadlock, or does the native stack wind through both messages? Parent stack: Child stack: 0) NPN_DestroyStream 0) NPP_DestroyStream 1) IPC Code 1) IPC Code 2) NPP_DestroyStream 2) NPP_DestroyStream 3) Pluginhost code 3) Plugin code Assuming it doesn't deadlock (since that would be bad!), I'm going to need some way of gracefully dealing with this race: neither side has committed a programming error. Part 2: Both of these calls map to the ~NPBrowserStream destructor. Will this invalidate the actor handle as the message is sent? Since I don't think the client code can prevent the race condition, the IPC/IPDL code will at least need to gracefully handle the destructor being called simultaneously from both sides. --BDS