Bug 148557 - Web Inspector: Type Profiler does not understand Functions within Default Argument Expressions
Summary: Web Inspector: Type Profiler does not understand Functions within Default Arg...
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: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-27 21:45 PDT by Joseph Pecoraro
Modified: 2015-08-28 12:10 PDT (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.38 KB, patch)
2015-08-27 22:02 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.