Re: avoiding races in IPDL protocols
Benjamin Smedberg <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
On 7/15/09 4:04 PM, Chris Jones wrote: >> Yeah, that defeats the point of having a protocol state system. >> > > Not really. It's a question of error handling --- no races would have > been tolerated in any case. The question is whether races are dynamic > errors (boo!), static errors of the C++ implementation (meh), or static > errors of the IPDL spec (yay!). That really depends on the error handling for dynamic protocol errors. If the only recourse is to abort the child process, then that's a very serious problem. In e.g. a channel protocol: parent: channel.close() and child: channel.dataAvailable() are both async messages. They race, with .close() winning somehow. That really shouldn't be a fatal error, it should just cause .dataAvailable to fail gracefully or be thrown away. --BDS