JSObject *scopeobj;
script_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){    JSScript *script;    JSStackFrame *fp, *caller;    JSObject *scopeobj;    if (!JS_InstanceOf(cx, obj, &js_ScriptClass, argv))        return JS_FALSE;    script = (JSScript *) JS_GetPrivate(cx, obj);    if (!script)        return JS_TRUE;    scopeobj = NULL;    if (argc) {        if (!js_ValueToObject(cx, argv[0], &scopeobj))            return JS_FALSE;        argv[0] = OBJECT_TO_JSVAL(scopeobj);    }    /* Emulate eval() by using caller's this, scope chain, and sharp array. */    fp = cx->fp;    caller = JS_GetScriptedCaller(cx, fp);    if (caller && !scopeobj)        scopeobj = caller->scopeChain;    return js_Execute(cx, scopeobj, script, caller, JSFRAME_EVAL, rval);}