Fix bug 455763 (r=me).
authorBrendan Eich <brendan@mozilla.org>
Sun, 21 Sep 2008 01:38:39 -0700
changeset 19593 c2a3ef237ca2123a896b2662fb50b5b1b15afc25
parent 19592 a6dc830e0ad910b6ebb38971ce4b24124c0ee52f
child 19594 c0364f5e0a847c99acc943f347d5200dc5724228
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)
reviewersme
bugs455763
milestone1.9.1b1pre
Fix bug 455763 (r=me).
js/src/jstracer.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -4884,18 +4884,17 @@ TraceRecorder::record_JSOP_CALL()
                 JSArena* a = cx->stackPool.current;
                 if (jsuword(newsp) > a->limit)
                     ABORT_TRACE("can't grow stack for Function.prototype.apply");
                 if (jsuword(newsp) > a->avail)
                     a->avail = jsuword(newsp);
             }
 
             jsval* argv = fp->argv;
-            uintN nargs = JS_MIN((JS_MIN(argc, fp->fun->nargs)), 2);
-            for (uintN i = 0; i < nargs; i++) {
+            for (uintN i = 0; i < JS_MIN(argc, 2); i++) {
                 set(&sp[i], get(&argv[i]));
                 sp[i] = argv[i];
             }
             applyingArguments = true;
             return interpretedFunctionCall(tval, tfun, argc, false);
         }
 
         if (aval_ins->fid() != F_Array_1str)