Subj : Re: JS_HandleTrap unhandled exception To : netscape.public.mozilla.jseng From : Brendan Eich Date : Fri Apr 01 2005 01:17 am Mike Moening wrote: > I get your point. That explains some lingering weirdness I've been seeing. > > I have no problem putting criticial sections around my trap set/clear code > but how do I prevent myself from stomping on the internal > spidermonkey trapList from another thread. In other words, can I "lock" the > internal trap list temporarily? I know it may delay execution but only for > millisecond. You have to acquire and release your own lock around calls to JS_SetTrap, JS_ClearTrap, etc. Since you are the only debugger in process, no one but your threads might run your code, so your lock is sufficient to serialize access. /be .