[EMAIL PROTECTED] (James Warner) writes:
> Ok,
> I was actually able to make this work by using the service class's
> that are provided via the ProxyObjectManagerClass by doing the
> following:
> On the main thread:
> Create/Initialize the mozilla services
> 
> On the secondary thread:
> 1. Create the proxyObjectManager
> 2. Get the windowWatcherService (which is running on the main thread)

This is part of your problem.  There is at least one bug related to
getting any kind of service on threads other than the primary one (bug
124980).

> 3. Call GetProxyForObject and return the proxy
> 4. Call OpenWindow with the correct URL.
> 
> The above scenario works very well if using a build compiled without
> debug,
> but if I try this on a debug build I receive a lot of asserts
> indicating that Service X isn't threadsafe.  My question now is:
> 1.  Is there a more correct way to do what is described above
> (hopefully one that
> allows the use of the debug code)
> 2.  Is there a method to basically specify that we are going to make
> these trusted threads even tho' they aren't specifically tagged as
> thread safe?

Not at the moment; right now you need use the threadsafe nsISupports
implementation (NS_IMPL_THREADSAFE_*) for any classes that you call
through a proxy (bug 101252).  

See <http://bugzilla.mozilla.org/showdependencytree.cgi?id=101976> for
a list of XPCOM threadsafety issues.

Dan


Reply via email to