Subj : Dormant stack frames.... To : netscape.public.mozilla.jseng From : "Jeroen de Borst" Date : Thu May 01 2003 03:58 pm Hi, I've run into a problem... I am executing several scripts simultaneuosly (using a different context for every invocation). The scripts may invoke a native function which causes execution of that script to suspend, to later be resumed. This suspend/resume is done using stack-saving and longjmp. Since no JS code is ever running in parallel I have not compiled with JS_THREADSAFE defailed. Now when I destroy the context of a terminated script, while I have one of these suspended scripts still around, I get an assertion failure from js_GC: Assertion failure: !chain->dormantNext, at jsgc.c:1193 Browsing through the sources I sort of understand that the whole dormant thing is there to deal with what I am trying to do: executing the GC whilte other stack frames are active? I see this code in js_Execute. I think the problem is that I execute my scripts by invoking JS_CallFunction (which uses js_InternalCall) rather than JS_ExecuteScript (which uses js_Execute). Is there anyway to make this work? Or should I try to map my functions to scripts (I'd rather not, but would, if this is the only way)? Or shouldn't JS_CallFunction (js_InternalCall) contain the same logic regarding dormant stack frams as js_Execute? thanks, Jeroen .