Bug 148318

Summary: Web Inspector: arrow function names are never inferred, call frames are labeled (anonymous function)
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, gskachkov, joepeck, mattbaker, nvasilyev, saam, timothy, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Test case
none
Current call frames appearance in inspector.
none
Patch
none
Fixed_version none

Description BJ 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 BJ 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.