Bug 143169 - Web Inspector: TypeProfiler doesn't work on files with ES6 Class Syntax
Summary: Web Inspector: TypeProfiler doesn't work on files with ES6 Class Syntax
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-27 18:05 PDT by Joseph Pecoraro
Modified: 2015-03-27 22:05 PDT (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (9.01 KB, patch)
2015-03-27 18:42 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (9.48 KB, patch)
2015-03-27 19:31 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[IMAGE] What it looks like (83.50 KB, image/png)
2015-03-27 19:32 PDT, Joseph Pecoraro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-03-27 18:05:00 PDT
* SUMMARY
TypeProfiler doesn't work on files with ES6 Class Syntax.

* STEPS
1. Inspect test page with Classes, instantiate instances and run methods
2. Type profile said page
  => Models/ScriptSyntaxTree.js:789:26: CONSOLE ERROR Unsupported Syntax Tree Node: ClassExpression

Probably need ClassExpression/ClassDeclaration at the least.
Comment 1 Radar WebKit Bug Importer 2015-03-27 18:05:15 PDT
<rdar://problem/20335450>
Comment 2 Joseph Pecoraro 2015-03-27 18:42:41 PDT
Created attachment 249631 [details]
[PATCH] Proposed Fix
Comment 3 Saam Barati 2015-03-27 19:11:19 PDT
Comment on attachment 249631 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=249631&action=review

Looks correct to me besides adding the one bit regarding setter/getter methods.

> Source/WebInspectorUI/UserInterface/Models/ScriptSyntaxTree.js:715
> +            };

Like what's done with "Property" below, we should do:
if (result.kind === "get" || result.kind === "set") {
    result.value.isGetterOrSetter = true;
    result.value.getterOrSetterRange = result.key.range;
}
Comment 4 Joseph Pecoraro 2015-03-27 19:31:43 PDT
Created attachment 249637 [details]
[PATCH] Proposed Fix

Good comment, that greatly fixed up my test case.
Comment 5 Joseph Pecoraro 2015-03-27 19:32:02 PDT
Created attachment 249638 [details]
[IMAGE] What it looks like
Comment 6 WebKit Commit Bot 2015-03-27 22:05:08 PDT
Comment on attachment 249637 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 249637

Committed r182106: <http://trac.webkit.org/changeset/182106>
Comment 7 WebKit Commit Bot 2015-03-27 22:05:14 PDT
All reviewed patches have been landed.  Closing bug.