frame.script = fun->script;
frame.script = FUN_SCRIPT(fun);
js_watch_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp){    JSRuntime *rt;    JSWatchPoint *wp;    JSScopeProperty *sprop;    jsval userid;    JSScope *scope;    JSBool ok;    rt = cx->runtime;    for (wp = (JSWatchPoint *)rt->watchPointList.next;         wp != (JSWatchPoint *)&rt->watchPointList;         wp = (JSWatchPoint *)wp->links.next) {        sprop = wp->sprop;        if (wp->object == obj && SPROP_USERID(sprop) == id) {            JS_LOCK_OBJ(cx, obj);            userid = SPROP_USERID(sprop);            scope = OBJ_SCOPE(obj);            JS_UNLOCK_OBJ(cx, obj);            HoldWatchPoint(wp);            ok = wp->handler(cx, obj, userid,                             SPROP_HAS_VALID_SLOT(sprop, scope)                             ? OBJ_GET_SLOT(cx, obj, wp->sprop->slot)                             : JSVAL_VOID,                             vp, wp->closure);            if (ok) {                /*                 * Create pseudo-frame for call to setter so that any                 * stack-walking security code in the setter will correctly                 * identify the guilty party.                 */                JSObject *funobj = (JSObject *) wp->closure;                JSFunction *fun = (JSFunction *) JS_GetPrivate(cx, funobj);                JSStackFrame frame;                memset(&frame, 0, sizeof(frame));                frame.script = fun->script;                frame.fun = fun;                frame.down = cx->fp;                cx->fp = &frame;                ok = !wp->setter ||                     ((sprop->attrs & JSPROP_SETTER)                      ? js_InternalCall(cx, obj, OBJECT_TO_JSVAL(wp->setter),                                        1, vp, vp)                      : wp->setter(cx, OBJ_THIS_OBJECT(cx, obj), userid, vp));                cx->fp = frame.down;            }            return DropWatchPoint(cx, wp);        }    }    JS_ASSERT(0);       /* XXX can't happen */    return JS_FALSE;}