Closed
Bug 392310
Opened 17 years ago
Closed 17 years ago
send(undefined) on newborn generator shouldn't cause error
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: norrisboyd, Assigned: norrisboyd)
Details
Attachments
(1 file, 1 obsolete file)
2.82 KB,
application/x-javascript
|
Details |
SpiderMonkey: js> function yielder() { print('before ye yield'); yield; print('after ye yield'); } js> var gen = yielder(); js> gen.send(undefined); before ye yield I.e. (per http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7), calling send(undefined) on a newborn generator is equivalent to calling next() to start it. Rhino: js> gen.send(undefined) js: "<stdin>", line 44: uncaught JavaScript runtime exception: TypeError: Attempt to send value to newborn generator
Assignee | ||
Comment 1•17 years ago
|
||
Checking in NativeGenerator.java; /cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/NativeGenerator.java,v <-- NativeGenerator.java new revision: 1.6; previous revision: 1.5 done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 2•17 years ago
|
||
Attachment #276798 -
Flags: review?(norrisboyd)
Assignee | ||
Comment 3•17 years ago
|
||
Updated proposed test to match Rhino error output.
Attachment #276798 -
Attachment is obsolete: true
Attachment #276798 -
Flags: review?(norrisboyd)
Comment 4•17 years ago
|
||
Checking in regress-392310.js; /cvsroot/mozilla/js/tests/js1_7/geniter/regress-392310.js,v <-- regress-392310.js initial revision: 1.1
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•