Set up the pseudo frame more carefully. bug 354978, r=brendan

git-svn-id: svn://10.0.0.236/trunk@214852 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2006-11-07 05:09:53 +00:00
parent fdd69d687c
commit 25c9ec0f96

View File

@@ -366,12 +366,14 @@ js_watch_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
*/
JSObject *funobj = (JSObject *) wp->closure;
JSFunction *fun = (JSFunction *) JS_GetPrivate(cx, funobj);
jsval argv[2] = { OBJECT_TO_JSVAL(funobj), JSVAL_NULL };
JSStackFrame frame;
memset(&frame, 0, sizeof(frame));
frame.script = FUN_SCRIPT(fun);
frame.fun = fun;
frame.down = cx->fp;
frame.argv = argv + 2;
cx->fp = &frame;
ok = !wp->setter ||
((sprop->attrs & JSPROP_SETTER)