Closed Bug 993389 Opened 10 years ago Closed 7 years ago

isGenerator fails for bound functions

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: asaf, Unassigned)

References

Details

var f = function*() { }.bind(this);
f.isGenerator()

returns false.
Blocks: 993391
Summary: isGenerator fails for bounded functions → isGenerator fails for bound functions
The isGenerator() method is "not a well-motivated reflective operation", so it's not clear it should even exist.  You'd do better to write your code in such a way that you don't even have to ask the question, at least if my understanding of #jslang discussion is correct.
Hey Jeff, Do you mind looking at the use case in PlacesTransaction.jsm (the transact method) - isGenerator is used for input validation.
ah... http://stackoverflow.com/a/19660350
No longer blocks: 993391
isGenerator will be removed in bug 1119777, as it works only for legacy generator that will also be removed near future.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
See Also: → 1119777
You need to log in before you can comment on or make changes to this bug.