mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 530879 - Generators get incorrect arguments.length. Discovered by Donny Viszneki. r=brendan.
This commit is contained in:
parent
90477b6487
commit
b46379b4f6
@ -766,7 +766,7 @@ js_NewGenerator(JSContext *cx, JSStackFrame *fp)
|
||||
/* Copy rval, argv and vars. */
|
||||
gen->frame.rval = fp->rval;
|
||||
memcpy(slots, fp->argv - 2, (2 + nargs) * sizeof(jsval));
|
||||
gen->frame.argc = nargs;
|
||||
gen->frame.argc = fp->argc;
|
||||
gen->frame.argv = slots + 2;
|
||||
slots += 2 + nargs;
|
||||
memcpy(slots, fp->slots, fp->script->nfixed * sizeof(jsval));
|
||||
|
@ -83,3 +83,4 @@ script regress-515885.js
|
||||
skip-if(isDebugBuild&&!xulRuntime.shell) script regress-524743.js # hang
|
||||
script regress-522123.js
|
||||
script regress-524264.js
|
||||
script regress-530879.js
|
||||
|
10
js/src/tests/js1_8_1/regress/regress-530879.js
Normal file
10
js/src/tests/js1_8_1/regress/regress-530879.js
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/licenses/publicdomain/
|
||||
* Contributor: Jason Orendorff
|
||||
*/
|
||||
gTestfile = 'regress-530879';
|
||||
function f(a, b, c, d) {
|
||||
yield arguments.length;
|
||||
}
|
||||
reportCompare(0, f().next(), "bug 530879");
|
Loading…
Reference in New Issue
Block a user