Bug 71367 - Web Inspector: preserve script location for inline handlers.
Summary: Web Inspector: preserve script location for inline handlers.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on: 71462
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-02 08:34 PDT by Pavel Feldman
Modified: 2011-11-03 05:23 PDT (History)
11 users (show)

See Also:


Attachments
Patch (38.92 KB, patch)
2011-11-02 10:02 PDT, Pavel Feldman
yurys: review+
dbates: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2011-11-02 08:34:43 PDT
Currently, inline handlers such as <body onload="foo()" are reported as starting at 0:0 to the debugger.
Comment 1 Pavel Feldman 2011-11-02 10:02:57 PDT
Created attachment 113324 [details]
Patch
Comment 2 Pavel Feldman 2011-11-02 10:11:32 PDT
Originally I was going to remove TextPosition from SourceProvider and make it live entirely in the SourceCode (see straw man patch for that here: https://bugs.webkit.org/show_bug.cgi?id=71358). However, it was regressing the debugger functionality a bit. Here are the details:

When debugger is enabled, recompilation takes place. It traverses heap functions in the heap, groups them by SourceProviders and reports them as "scripts" to the debugger. It is important that debugger receives its signals with the "script" granularity where each "script" has an offset in the resource with its "url". SourceProvider's ID is used as a "script" id in the debugger.

It does sound that having position information on the SourceProvider is superfluous. But we do need this "script" concept and it sounds like SourceProvider is what we need (except for the name is confusing). So either we need to leave position information in it or we should make it reference the "top level" script it is associated with. Then we can leave text positions in SourceCodes only. In either case, this change seems like the right step in that direction.
Comment 3 Daniel Bates 2011-11-02 16:53:05 PDT
Comment on attachment 113324 [details]
Patch

Attachment 113324 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/10148374
Comment 4 Pavel Feldman 2011-11-03 05:02:32 PDT
Committed r99167: <http://trac.webkit.org/changeset/99167>