| Summary: | Web Inspector: Basic Block Annotations and Type Profiler annotations wrong for script with "class" with default constructor | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||||
| Component: | Web Inspector | Assignee: | Saam Barati <saam> | ||||||
| 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 | ||||||||
| Bug Depends on: | 149427, 149429 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
Created attachment 261369 [details]
[IMAGE] Issue
This seems like a bug in JSC. I'll take it I think the problem here has to do with default constructors. (In reply to comment #3) > I think the problem here has to do with default constructors. It does. And their bogus "text ranges" that we interpret as being part of the user program's source code. It's obviously not. We parse these default constructors from C++ Strings we create. Created attachment 261679 [details]
patch
This is one possible solution.
Another solution is to set a bit on
UnlinkedFunctionExecutable indicating it's a default
constructor (or we can generalize the bit to mean that
this thing was created outside the user's source code).
And, if that bit is set, we will not insert the function
as an unexecuted range.
Comment on attachment 261679 [details]
patch
r=me
Comment on attachment 261679 [details] patch Clearing flags on attachment: 261679 Committed r190086: <http://trac.webkit.org/changeset/190086> All reviewed patches have been landed. Closing bug. Re-opened since this is blocked by bug 149427 landed in: http://trac.webkit.org/changeset/190108 |
* SUMMARY Basic Block Annotations and Type Profiler annotations wrong for script with "class". * TEST (bad-script.js) var a; var b = 1; var c = 1; class Foo {}; * STEPS TO REPRODUCE 1. Turn on the Type Profiler / Code Coverage 2. Run the above script => mis-highlighted regions and types