if (cx->runtime->checkObjectAccess) {
if (!JSVAL_IS_PRIMITIVE(*vp) && cx->runtime->checkObjectAccess) {
fun_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp){    jsint slot;    JSFunction *fun;    JSStackFrame *fp;#if defined XP_PC && defined _MSC_VER &&_MSC_VER <= 800    /* MSVC1.5 coredumps */    jsval bogus = *vp;#endif    if (!JSVAL_IS_INT(id))        return JS_TRUE;    slot = JSVAL_TO_INT(id);    /* No valid function object should lack private data, but check anyway. */    fun = (JSFunction *)JS_GetInstancePrivate(cx, obj, &js_FunctionClass, NULL);    if (!fun)        return JS_TRUE;    /* Find fun's top-most activation record. */    for (fp = cx->fp; fp && (fp->fun != fun || (fp->flags & JSFRAME_SPECIAL));         fp = fp->down) {        continue;    }    switch (slot) {      case CALL_ARGUMENTS:#if JS_HAS_ARGS_OBJECT        /* Warn if strict about f.arguments or equivalent unqualified uses. */        if (!JS_ReportErrorFlagsAndNumber(cx,                                          JSREPORT_WARNING | JSREPORT_STRICT,                                          js_GetErrorMessage, NULL,                                          JSMSG_DEPRECATED_USAGE,                                          js_arguments_str)) {            return JS_FALSE;        }        if (fp) {            if (!js_GetArgsValue(cx, fp, vp))                return JS_FALSE;        } else {            *vp = JSVAL_NULL;        }        break;#else  /* !JS_HAS_ARGS_OBJECT */        *vp = OBJECT_TO_JSVAL(fp ? obj : NULL);        break;#endif /* !JS_HAS_ARGS_OBJECT */      case ARGS_LENGTH:        if (!JSVERSION_IS_ECMA(cx->version))            *vp = INT_TO_JSVAL((jsint)(fp && fp->fun ? fp->argc : fun->nargs));        else      case FUN_ARITY:            *vp = INT_TO_JSVAL((jsint)fun->nargs);        break;      case FUN_NAME:        *vp = fun->atom              ? ATOM_KEY(fun->atom)              : STRING_TO_JSVAL(cx->runtime->emptyString);        break;      case FUN_CALLER:        if (fp && fp->down && fp->down->fun && fp->down->argv)            *vp = fp->down->argv[-2];        else            *vp = JSVAL_NULL;        if (cx->runtime->checkObjectAccess) {            id = ATOM_KEY(cx->runtime->atomState.callerAtom);            if (!cx->runtime->checkObjectAccess(cx, obj, id, JSACC_READ, vp))                return JS_FALSE;        }        break;      default:        /* XXX fun[0] and fun.arguments[0] are equivalent. */        if (fp && fp->fun && (uintN)slot < fp->fun->nargs)#if defined XP_PC && defined _MSC_VER &&_MSC_VER <= 800          /* MSVC1.5 coredumps */          if (bogus == *vp)#endif            *vp = fp->argv[slot];        break;    }    return JS_TRUE;}