Subj : Re: SpiderMonkey's Funky GC and me To : netscape.public.mozilla.jseng From : Alex Date : Thu Mar 24 2005 08:48 am "Brendan Eich" a écrit dans le message de news:d1selh$sdd3@ripley.netscape.com... > Alex wrote: > > > //m_ScriptArray is an array of compiled script (we are meant to use more > > than only one) > > for (int i = 0; i < SCRIPTNBR; i++) > > m_ScriptArray[i] = NULL; > . . . > > JSScript *lscript = JS_CompileScript(m_Context, m_GlobalObj, > > lscriptBuff, > > > > strlen(lscriptBuff), > > a_path, > > 0); > > m_ScriptArray[42] = lscript; > > > You failed to protect precompiled scripts using object wrappers > referenced by GC roots. See > http://lxr.mozilla.org/mozilla/source/js/src/jsapi.h#1350 and (mainly) > http://lxr.mozilla.org/mozilla/source/js/src/jsapi.h#1388. Yep, seems that's the problem. Thanks a lot -- Alex .