Re: Spider Monkey and jsdiDebuggerService Crash?

"John J. Barton" <[email protected]> Wed, 02 Sep 2009 08:43:19 -0700
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
Jiyul wrote:
...
> But that plugin works okay with just clean firefox. It crashes when some 
> other component uses jsdIDebuggerService like as our IDE(when it 
> debugging script) or firebug.
> 
> I have two suspects:
> 
> Q. If some native c++ code can invoke some script, It must be executed 
> UI-thread, because some XHTML DOM can be modified by script. Our c++ 
> code seems to have not guarantee for that.  Am I right? then how to do 
> that?

If you question is "must jsd be called on the UI-thread" the answer is 
almost certainly "yes". Nothing about the design of jsd is thread safe, 
and specifically it creates data that points to js objects. So any 
caller of jsd must be on the same thread as the creator of js objects as 
far as I know.

> (I am an eclipse based IDE developer so I don't know much)
> 
> 
> Q. Does calling script through Spider Monkey can be problem with using 
> jsdIDebuggerService?

I don't understand this question. jsdIDebuggerService is part of the JS 
engine.

jjb