Bug 148557

Summary: Web Inspector: Type Profiler does not understand Functions within Default Argument Expressions
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, saam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2015-08-27 21:45:10 PDT
* SUMMARY
Type Profiler does not understand Functions within Default Argument Expressions.

Default Argument Expressions are currently ignored by our SyntaxTree.

* TESTS
function testFunctionDeclaration(a=(function(alpha=999){return alpha})(), b=20) { return a + b; }; add2();
(function testFunctionExpression(a=(function(alpha=999){return alpha})(), b=20) { return a + b; })()

* RESULTS
Expected type bubbles for the inner `function(alpha)...` function expressions, but they were even visited by our annotator.

* NOTES
No errors or warnings.
Comment 1 Radar WebKit Bug Importer 2015-08-27 21:45:38 PDT
<rdar://problem/22470013>
Comment 2 Joseph Pecoraro 2015-08-27 22:02:04 PDT
Created attachment 260119 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2015-08-28 05:58:32 PDT
Comment on attachment 260119 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 260119

Committed r189096: <http://trac.webkit.org/changeset/189096>
Comment 4 WebKit Commit Bot 2015-08-28 05:58:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Saam Barati 2015-08-28 12:10:18 PDT
I wonder if the JSC implementation of the type profiler
properly handles this. I don't think it does.