Bug 413556: Patch from Jason Orendorff to fix JS_ConvertArguments. r,a=brendan
authorigor@mir2.org
Wed, 23 Jan 2008 06:20:38 -0800
changeset 10574 6be114e3a17fe3820abdc60d954c08554c603989
parent 10573 2fbb8d1a371cf706f99efaa6318bfab48d4b2722
child 10575 68e6853eaaa61497ff4d28e6bac9a9074bb3be5f
push idunknown
push userunknown
push dateunknown
reviewersbrendan
bugs413556
milestone1.9b3pre
Bug 413556: Patch from Jason Orendorff to fix JS_ConvertArguments. r,a=brendan
js/src/jsapi.c
--- a/js/src/jsapi.c
+++ b/js/src/jsapi.c
@@ -253,16 +253,17 @@ JS_ConvertArgumentsVA(JSContext *cx, uin
                 return JS_FALSE;
             *sp = OBJECT_TO_JSVAL(obj);
             *va_arg(ap, JSObject **) = obj;
             break;
           case 'f':
             obj = js_ValueToFunctionObject(cx, sp, 0);
             if (!obj)
                 return JS_FALSE;
+            *sp = OBJECT_TO_JSVAL(obj);
             *va_arg(ap, JSFunction **) = (JSFunction *) JS_GetPrivate(cx, obj);
             break;
           case 'v':
             *va_arg(ap, jsval *) = *sp;
             break;
           case '*':
             break;
           default: