Subj : js engine crashes at NewScopeProperty To : netscape.public.mozilla.jseng From : "Pradip Singh" Date : Mon Mar 22 2004 12:56 pm This is a multi-part message in MIME format. ------=_NextPart_000_0084_01C4100D.1CB2B6B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi all =20 I have ported JS Engine to palmOS. I am facing a problem. My script has compiled properly using the function JS_CompileFileHandle(cx, glob, filename,&fileRef); Now when i am trying to execute the script using the function=20 JS_ExecuteScript(cx, glob, script, &result); It crashes in the function =20 static JSScopeProperty * NewScopeProperty(JSRuntime *rt) { JSScopeProperty *sprop; =20 sprop =3D rt->propertyFreeList; if (sprop) { FREENODE_REMOVE(sprop); } else { JS_ARENA_ALLOCATE_CAST(sprop, JSScopeProperty *, &rt->propertyArenaPool, sizeof(JSScopeProperty)); if (!sprop) return NULL; } =20 JS_RUNTIME_METER(rt, livePropTreeNodes); JS_RUNTIME_METER(rt, totalPropTreeNodes); return sprop; } =20 in jsscope.c. It crashes at this point JS_ARENA_ALLOCATE_CAST(sprop, JSScopeProperty *, &rt->propertyArenaPool, sizeof(JSScopeProperty)); Plz help. Any help will be appriciated. =20 thanx regards, Pradip =20 ------=_NextPart_000_0084_01C4100D.1CB2B6B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Hi all
 
  I have = ported JS Engine=20 to palmOS. I am facing a problem. My script
has compiled properly = using the=20 function JS_CompileFileHandle(cx, glob,
filename,&fileRef); Now = when i am=20 trying to execute the script using the
function =
JS_ExecuteScript(cx,=20 glob, script, &result);
It crashes in the = function
 
static=20 JSScopeProperty *
NewScopeProperty(JSRuntime = *rt)
{
   =20 JSScopeProperty *sprop;
 
    sprop =3D=20 rt->propertyFreeList;
    if (sprop)=20 {
       =20 FREENODE_REMOVE(sprop);
    } else=20 {
        = JS_ARENA_ALLOCATE_CAST(sprop,=20 JSScopeProperty=20 *,
           &= nbsp;           &n= bsp;      =20 &rt->propertyArenaPool,
      &nb= sp;           &nbs= p;           =20 sizeof(JSScopeProperty));
        = if=20 (!sprop)
          &= nbsp;=20 return NULL;
    }
 
   =20 JS_RUNTIME_METER(rt, livePropTreeNodes);
   =20 JS_RUNTIME_METER(rt, totalPropTreeNodes);
    return=20 sprop;
}
 
in jsscope.c. It crashes at this=20 point
JS_ARENA_ALLOCATE_CAST(sprop, JSScopeProperty=20 *,
           &= nbsp;           &n= bsp;      =20 &rt->propertyArenaPool,
      &nb= sp;           &nbs= p;           =20 sizeof(JSScopeProperty));
Plz help. Any help will be=20 appriciated.
 
thanx=20 regards,
Pradip
 
------=_NextPart_000_0084_01C4100D.1CB2B6B0-- .