fp->argv[-1] = OBJECT_TO_JSVAL(thisp);
ComputeThis(JSContext *cx, JSObject *thisp, JSStackFrame *fp){    JSObject *parent;    if (thisp && OBJ_GET_CLASS(cx, thisp) != &js_CallClass) {        /* Some objects (e.g., With) delegate 'this' to another object. */        thisp = OBJ_THIS_OBJECT(cx, thisp);        if (!thisp)            return JS_FALSE;        /* Default return value for a constructor is the new object. */        if (fp->constructing)            fp->rval = OBJECT_TO_JSVAL(thisp);    } else {        /*         * ECMA requires "the global object", but in the presence of multiple         * top-level objects (windows, frames, or certain layers in the client         * object model), we prefer fun's parent.  An example that causes this         * code to run:         *         *   // in window w1         *   function f() { return this }         *   function g() { return f }         *         *   // in window w2         *   var h = w1.g()         *   alert(h() == w1)         *         * The alert should display "true".         */        JS_ASSERT(!fp->constructing);        parent = OBJ_GET_PARENT(cx, JSVAL_TO_OBJECT(fp->argv[-2]));        if (!parent) {            thisp = cx->globalObject;        } else {            /* walk up to find the top-level object */            thisp = parent;            while ((parent = OBJ_GET_PARENT(cx, thisp)) != NULL)                thisp = parent;        }    }    fp->thisp = thisp;    fp->argv[-1] = OBJECT_TO_JSVAL(thisp);    return JS_TRUE;}