if (caller && !scopeobj) scopeobj = caller->scopeChain;
if (!scopeobj) {  if (caller) {  if (!caller->varobj) {  JS_ASSERT(caller->fun && !(caller->fun->flags & JSFUN_HEAVYWEIGHT));   parent = OBJ_GET_PARENT(cx, JSVAL_TO_OBJECT(caller->argv[-2])); if (!js_GetCallObject(cx, caller, parent)) return JS_FALSE; }   scopeobj = caller->scopeChain; } else {  scopeobj = cx->globalObject; } }
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);}