fun->nrefs = 0; fun->object = NULL;
js_NewFunction(JSContext *cx, JSObject *funobj, JSNative call, uintN nargs,	       uintN flags, JSObject *parent, JSAtom *atom){    JSFunction *fun;    /* Allocate a function struct. */    fun = JS_malloc(cx, sizeof *fun);    if (!fun)	return NULL;    fun->nrefs = 0;    fun->object = NULL;    /* If funobj is null, allocate an object for it. */    if (!funobj) {	funobj = js_NewObject(cx, &js_FunctionClass, NULL, parent);	if (!funobj) {	    JS_free(cx, fun);	    return NULL;	}    } else {	OBJ_SET_PARENT(cx, funobj, parent);    }    /* Link fun to funobj and vice versa. */    if (!js_LinkFunctionObject(cx, fun, funobj)) {	cx->newborn[GCX_OBJECT] = NULL;	JS_free(cx, fun);	return NULL;    }    /* Initialize remaining function members. */    fun->call = call;    fun->nargs = nargs;    fun->flags = flags & JSFUN_FLAGS_MASK;    fun->extra = 0;    fun->nvars = 0;    fun->spare = 0;    fun->atom = atom;    fun->script = NULL;    fun->clasp = NULL;    return fun;}