Dan Lange wrote:

> I can not use separate proxies for the Service and the DataSource.  When I
> try to proxy the DataSource, the Proxy Manager crashes, because it uses
> GetAddRef, which recognizes that the Proxy Manager is running in my thread,
> while the DataSource can only be used in the UI thread, and throws a
> threadsafe exception.
> If I try to proxy the proxy manager, so that it too is running in the UI
> thread, it just laughs at me an crashes.


Create the proxy on the main thread with PROXY_ASYNC|PROXY_ALWAYS, and 
pass the proxy to the new thread.


> interfaces.  There is a file named xpti.dat that is used to determine which
> xpt files are loaded.  This complete list of all XPCOM interfaces is
> generated by Mozilla, and I really shouldn't be changing it, especially not
> if I want to be compatible with multiple Mozilla versions.


You just need to stick your .xpt file in the Mozilla directory.  The 
xpcom registration process (regxpcom) should manage this for you fine.

Note that your interface _must_ be marked "scriptable".

ActiveState's Komodo project makes _heavy_ use of proxies.


Mark.


Reply via email to