Bug 148318 - Web Inspector: arrow function names are never inferred, call frames are labeled (anonymous function)
Summary: Web Inspector: arrow function names are never inferred, call frames are label...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-21 12:02 PDT by Brian Burg
Modified: 2015-09-21 12:12 PDT (History)
11 users (show)

See Also:


Attachments
Test case (315 bytes, text/html)
2015-08-21 12:02 PDT, Brian Burg
no flags Details
Current call frames appearance in inspector. (182.47 KB, image/png)
2015-08-21 12:04 PDT, Brian Burg
no flags Details
Patch (1.72 KB, patch)
2015-09-21 08:19 PDT, GSkachkov
no flags Details | Formatted Diff | Diff
Fixed_version (80.90 KB, image/png)
2015-09-21 12:00 PDT, GSkachkov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2015-08-21 12:02:05 PDT
Created attachment 259638 [details]
Test case

In a simple case like 

let a = () => {}

JSC should be able to infer this function's name as 'a'.
Comment 1 Radar WebKit Bug Importer 2015-08-21 12:02:53 PDT
<rdar://problem/22383041>
Comment 2 Brian Burg 2015-08-21 12:04:50 PDT
Created attachment 259640 [details]
Current call frames appearance in inspector.
Comment 3 GSkachkov 2015-09-21 04:35:21 PDT
As I understand this is related to the SetFunctionName operation described in ES6 specification 
http://www.ecma-international.org/ecma-262/6.0/#sec-setfunctionname

 
So arrow function should support name property.
let a = () => {};
a.name === 'a';  //TRUE
Comment 4 GSkachkov 2015-09-21 07:13:00 PDT
Ohh I see that there is used anther property inferredName.
Comment 5 GSkachkov 2015-09-21 08:19:25 PDT
Created attachment 261656 [details]
Patch

Tiny fix, but need a lot of time until I can check it in Web Inspector because of the long build
Comment 6 GSkachkov 2015-09-21 12:00:39 PDT
Created attachment 261673 [details]
Fixed_version

Looks like fixed
Comment 7 Saam Barati 2015-09-21 12:02:16 PDT
Comment on attachment 261656 [details]
Patch

r=me
I like one line bug fixes.
Comment 8 WebKit Commit Bot 2015-09-21 12:12:00 PDT
Comment on attachment 261656 [details]
Patch

Clearing flags on attachment: 261656

Committed r190066: <http://trac.webkit.org/changeset/190066>
Comment 9 WebKit Commit Bot 2015-09-21 12:12:09 PDT
All reviewed patches have been landed.  Closing bug.