Closed Bug 637246 Opened 15 years ago Closed 15 years ago

generator.close() should return undefined

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dherman, Assigned: luke)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Apparently generator.close() got turned into a fast native but doesn't explicitly return the undefined value, so it accidentally returns the callee from the operand stack: js> (function(){yield})().close() function close() {[native code]} Dave
Attached patch fixSplinter Review
Arg, incomplete human-powered control flow analysis. Thanks for finding Dave!
Assignee: general → lw
Status: NEW → ASSIGNED
Attachment #515672 - Flags: review?(brendan)
Attachment #515672 - Flags: review?(brendan) → review+
Trivial patch fixing minor bug; hard to judge whether I should request approval for 2.0. I'm going to default to 'no' given the late stage.
Not a regression, ancient bug -- can't block but couldn't hurt. Land when Fx4 has "branched" is the right answer. /be
Whiteboard: fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: