Bug 148400 - Callee can be incorrectly overridden when it's captured
Summary: Callee can be incorrectly overridden when it's captured
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 14:44 PDT by Saam Barati
Modified: 2015-08-25 11:40 PDT (History)
9 users (show)

See Also:


Attachments
patch (21.73 KB, patch)
2015-08-24 18:59 PDT, Saam Barati
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2015-08-24 14:44:54 PDT
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.
Comment 1 Saam Barati 2015-08-24 18:59:25 PDT
Created attachment 259805 [details]
patch
Comment 2 Saam Barati 2015-08-25 11:40:56 PDT
landed in:
http://trac.webkit.org/changeset/188926