Clear argsobj private on trace (bug 522024, r=dmandelin).
authorDavid Anderson <danderson@mozilla.com>
Thu, 22 Oct 2009 17:56:46 -0700
changeset 34328 34be4f52a1df00a94b7b3c0a911dc92599582e31
parent 34327 1cf809824643612941f84d8336aa3745c93dddc9
child 34329 5555bb22bcc24e03b685f1ac9ffc84d565e5f7ad
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmandelin
bugs522024
milestone1.9.3a1pre
Clear argsobj private on trace (bug 522024, r=dmandelin).
js/src/jsfun.cpp
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -296,16 +296,17 @@ JS_DEFINE_CALLINFO_6(extern, OBJECT, js_
                      DOUBLEPTR, APNPTR, 0, 0)
 
 /* FIXME change the return type to void. */
 JSBool JS_FASTCALL
 js_PutArguments(JSContext *cx, JSObject *argsobj, jsval *args)
 {
     JS_ASSERT(js_GetArgsPrivateNative(argsobj));
     PutArguments(cx, argsobj, args);
+    argsobj->setPrivate(NULL);
     return true;
 }
 
 JS_DEFINE_CALLINFO_3(extern, BOOL, js_PutArguments, CONTEXT, OBJECT, JSVALPTR, 0, 0)
 
 static JSBool
 args_delProperty(JSContext *cx, JSObject *obj, jsval idval, jsval *vp)
 {
@@ -504,17 +505,17 @@ ArgGetter(JSContext *cx, JSObject *obj, 
          * arg can exceed the number of arguments if a script changed the
          * prototype to point to another Arguments object with a bigger argc.
          */
         uintN arg = uintN(JSVAL_TO_INT(idval));
         if (arg < GetArgsLength(obj)) {
 #ifdef JS_TRACER
             js_ArgsPrivateNative *argp = js_GetArgsPrivateNative(obj);
             if (argp) {
-                if (js_NativeToValue(cx, *vp, (JSTraceType) 1, &argp->argv[arg]))
+                if (js_NativeToValue(cx, *vp, argp->typemap()[arg], &argp->argv[arg]))
                     return true;
                 js_LeaveTrace(cx);
                 return false;
             }
 #endif
 
             JSStackFrame *fp = (JSStackFrame *) obj->getPrivate();
             if (fp) {