New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 590851 link

Starred by 3 users

Issue metadata

Status: Archived
Owner:
Closed: Oct 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: replace (anonymous function) with synthetic function expression names

Project Member Reported by paulir...@chromium.org, Feb 29 2016

Issue description

Between callback functions and the rise of arrow functions, we have more and more anonymous functions in javascript callstacks.
They are provided without context, making it difficult to identify. Attached is a screenshot from pokedex.org ... 11 out of 25 call frames are anonymous.

Let's explore if we can provide better inferred function names.

It appears we can take a similar approach to Java's lambda expressions and denote the anonymous function as `parentScope.$1function`

Question: I believe it's the parent scope that we'd adopt the synthetic name from. Is that the executioncontext, closure scope, or what?
 
Screen Shot 2016-02-29 at 12.06.56 PM.png
60.9 KB View Download
Summary: DevTools: replace (anonymous function) with synthetic function expression names (was: DevTools: replace (anonymous function) with synthetic function expressions)
james long of mozilla mentioned spidermonkey has pretty good function name inference. 

I spent some time finding some good comparisons.. There's certainly some differences and a few cases where the names in Chrome are more complete. 

But there are plenty of examples where Chrome has no name and Firefox's inferred name is quite valuable.  Attached are two comparisons.
spidermonkey func name interence - seattletimes.png
93.7 KB View Download
spidermonkey func name interence - touch.toyota.png
342 KB View Download
Owner: alph@chromium.org
Status: Assigned (was: Available)
Status: Archived (was: Assigned)
Bulk closing low-priority issues with no activity. Please re-file and refer to the closed issue if it's essential to fix.

Sign in to add a comment