WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159800
GeneratorFunction source code does not include star
https://bugs.webkit.org/show_bug.cgi?id=159800
Summary
GeneratorFunction source code does not include star
Alexey Shvayka
Reported
2016-07-14 20:02:03 PDT
I am working on robust generator function detection solution, and it seems like checking the result of `Function#toString` is clear winner here: `GeneratorFunction` [[Prototype]] can be changed, `.prototype` can be replaced etc. However, WebKit Nightly (build 203240) does not include * in generators functions code. Other browsers (FF Nightly, Chrome Canary) do include star and even normalize spacing after `function` keyword (remove it). For the sake of web compatibility and coming `Function#toString` revision (
https://github.com/tc39/Function-prototype-toString-revision
), it would be great to match other browsers.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2019-06-01 14:23:15 PDT
As of build 246014, `Function#toString` works correctly with generator functions.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug