Closed
Bug 530879
Opened 15 years ago
Closed 15 years ago
generators get incorrect arguments.length
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: donny.viszneki, Assigned: jorendorff)
Details
Attachments
(1 file)
1.79 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15 Build Identifier: revision 2f75734c2211 and others Generators seem to get an incorrect arguments.length. It seems that arguments.length is always the length of the argument vector in the generator function's definition, not the length of the argument vector from the generator's constructor invocation. Reproducible: Always Steps to Reproduce: js -e 'print((function(a,b,c,d){yield arguments.length})().next()===4)' Actual Results: true Expected Results: false Have a nice day :)
Comment 1•15 years ago
|
||
Thanks, Donny. Gives false in 1.9.0 (firefox 3) era js shell. Did this regress recently? Any bisect help appreciated. /be
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Updated•15 years ago
|
Assignee: general → jorendorff
Assignee | ||
Comment 2•15 years ago
|
||
Assignee | ||
Updated•15 years ago
|
Attachment #415741 -
Flags: review?(brendan)
Assignee | ||
Comment 3•15 years ago
|
||
Comment on attachment 415741 [details] [diff] [review] v1 Introduced here: http://hg.mozilla.org/tracemonkey/diff/471f34aa61df/js/src/jsiter.cpp The code used to say gen->frame.argc = argc; not nargs, but that was obscured by a macro.
Comment 4•15 years ago
|
||
Comment on attachment 415741 [details] [diff] [review] v1 Nice, thanks for patching. And thanks again to Donny for noticing! /be
Attachment #415741 -
Flags: review?(brendan) → review+
Comment 5•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/8abbf11c0724
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•