Interface for JSStackFrame.argc, bug 586533. r=lw

This commit is contained in:
Brian Hackett
2010-08-19 16:44:12 -07:00
parent 2f3a161964
commit 3e4d1557c4
9 changed files with 101 additions and 80 deletions

View File

@@ -1095,8 +1095,8 @@ js_NewGenerator(JSContext *cx)
/* Load and compute stack slot counts. */
JSStackFrame *fp = cx->fp;
uintN argc = fp->argc;
uintN nargs = JS_MAX(argc, fp->getArgumentCount());
uintN argc = fp->numActualArgs();
uintN nargs = JS_MAX(argc, fp->numFormalArgs());
uintN vplen = 2 + nargs;
/* Compute JSGenerator size. */
@@ -1139,7 +1139,7 @@ js_NewGenerator(JSContext *cx)
newfp->setScript(fp->getScript());
newfp->setFunction(fp->getFunction());
newfp->setThisValue(fp->getThisValue());
newfp->argc = fp->argc;
newfp->setNumActualArgs(fp->numActualArgs());
newfp->argv = vp + 2;
newfp->setReturnValue(fp->getReturnValue());
newfp->setAnnotation(NULL);