RESOLVED FIXED71367
Web Inspector: preserve script location for inline handlers.
https://bugs.webkit.org/show_bug.cgi?id=71367
Summary Web Inspector: preserve script location for inline handlers.
Pavel Feldman
Reported 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.
Attachments
Patch (38.92 KB, patch)
2011-11-02 10:02 PDT, Pavel Feldman
yurys: review+
dbates: commit-queue-
Pavel Feldman
Comment 1 2011-11-02 10:02:57 PDT
Pavel Feldman
Comment 2 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.
Daniel Bates
Comment 3 2011-11-02 16:53:05 PDT
Pavel Feldman
Comment 4 2011-11-03 05:02:32 PDT
Note You need to log in before you can comment on or make changes to this bug.