Re: Simultaneous rpc calls

Chris Jones <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
Benjamin Smedberg wrote:
> On 8/17/09 12:07 PM, Chris Jones wrote:
> 
>> I don't see how this race can occur in NPStream.  The browser owns the
>> "thread of control" and plugin code can only execute when the browser
>> transfers control to the plugin (through a function call in
>> single-process land, RPC message in multi-process).  Your race above
>> would only happen if the plugin tried to send NPN_DestroyStream() of its
>> own volition, which NPAPI doesn't allow.
> 
> Sure it does... the plugin is allowed to call NPN_DestroyStream at any time,
> for example if the user clicks "Stop" on a flash video. And the plugin
> handles window messages, so it can gain control any time we process messages
> in the main event loop.
> 

Quick followup --- the missing ingredient to this discussion is that the 
initial plan is to break the NPAPI threading model by having the plugin 
handle window events in its own thread of control (at least for windowed 
plugins) concurrently with the browser's thread of control.  I think we 
should discuss this in its own topic before getting into IPDL details.

Cheers,
Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.