| Summary: | Callee can be incorrectly overridden when it's captured | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> | ||||
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | basile_clement, benjamin, fpizlo, ggaren, mark.lam, mmirman, msaboff, oliver, ysuzuki | ||||
| Priority: | P2 | ||||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 259805 [details]
patch
landed in: http://trac.webkit.org/changeset/188926 |
Consider these two programs: "(function foo() { foo = 20; print(foo); })();" and "(function foo() { let x = function() { return foo; }; foo = 20; print(foo) })();" They have different behaviors. The latter incorrectly assigns 20 to foo. I think we can probably make this Just Work with a FunctionNameScope.