Boris Zbarsky wrote:

Accessing DOM nodes from off the main thread is not ok. If you're using a debug build you'll see all sorts of beautiful assertions when you do this.

Boris,
Okay, now I really am running into some thread issues. I'll make this quick..well, I'll try ;). I've got a 3rd party MS COM object that fires events...and based on those events is what Gecko does. Of course this COM is in it's own thread, so when I do this, I get those assertions you were talking bout. I've tried to do nsIProxyObjectManager::GetProxyForObject () on my Chrome's web browser, then go from there. Well as soon as nsIProxyObjectManager::GetProxyForObject () executes, I get those assertions. Here is the line of code I'm using when those events fire in the MS COM object to get a proxy to my chrome's web browser...

//pwb is Chrome's web browser
//pCOM_pom is the nsIProxyObjectManager that was created
if (NS_FAILED (pCOM_pom->GetProxyForObject (NS_UI_THREAD_EVENTQ, NS_GET_IID (nsIWebBrowser), pwb, PROXY_ALWAYS | PROXY_SYNC, (void**) &pwbProxy)))
                {
                        return;
                }

Possible suggestions? The only other solution I can come up with is to use flags....and in my Gecko event loop check those flags to see if they had been set in that other thread. I'm hoping you or someone can suggest a more elegant solution. Thanks for your time!

Niky Williams
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to