Bug 148400

Summary: Callee can be incorrectly overridden when it's captured
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: 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:
Description Flags
patch fpizlo: review+

Saam Barati
Reported 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.
Attachments
patch (21.73 KB, patch)
2015-08-24 18:59 PDT, Saam Barati
fpizlo: review+
Saam Barati
Comment 1 2015-08-24 18:59:25 PDT
Saam Barati
Comment 2 2015-08-25 11:40:56 PDT
Note You need to log in before you can comment on or make changes to this bug.