Christian Biesinger <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> William Buch wrote:
> > I DO NEED the thread to make my plugin work, so the question is what
> > am I doing wrong for the bi-directional, and is the thread to blame?
> > I am crossing my fingers that it is not.
>
> I would blame the thread... do you have a way to proxy the call to the
> UI Thread?
> If you can use XPCOM, you can use the approach described at
> http://www.mozilla.org/projects/xpcom/Proxies.html
I have figured out the thread problem. Using pthread is out of the
question. Using the simple fork option will allow the calls to be
placed properly. Now, the one thing that I do not know if I have done
correctly is the javascript object and the call to the javascript
object. Please see the code below:
nsISimpleJSO* *jsObject;
nsScriptablePeer *peer = getScriptablePeer();
peer->GetJsObject(jsObject);
if(jsObject != NULL)
{
printf ("Executing JavaScript!\n");
nsISimpleJSO*& object = *jsObject;
if (NS_SUCCEEDED(object->HandleUtterance((const char
*)&hyp)))
{
}
else
{
printf ("Call failed.\n");
}
}
The code above will basically cause a seg fault in the browser. Does
this have anything to do with netscape being single threaded and I
cannot make a call to the netscape thread from my child process? Any
help would be greatly appreciated.
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom