Closed Bug 637246 Opened 9 years ago Closed 9 years ago

generator.close() should return undefined

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

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
http://hg.mozilla.org/tracemonkey/rev/f5fbe627578d
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/f5fbe627578d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.