Bug 79130 - Web Inspector: replace RawSourceCode with a set of global mappings.
Summary: Web Inspector: replace RawSourceCode with a set of global mappings.
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 Podivilov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-21 11:06 PST by Pavel Podivilov
Modified: 2012-03-21 10:48 PDT (History)
10 users (show)

See Also:


Attachments
Path. (50.30 KB, text/plain)
2012-02-21 11:11 PST, Pavel Podivilov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2012-02-21 11:06:39 PST
Single source file could be referenced from a bunch of compiler source mappings that came from scripts with different urls (see bug 79122).
RawSourceCode doesn't support this scenario. We need a more generic interface that maps VM scripts to UISourceCodes and back, e.g.:

SourceMapping {
    uiLocation rawLocationToUILocation(scriptId, lineNumber, columnNumber)
    rawLocation uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber)
    Array<UISourceCode> uiSourceCodeList()
    [event] UISourceCodeListChanged(removed, added)
    addScript(script)
}

As a bonus, resources-based mapping and compiler mapping could be cleanly separated.
As an another bonus, we can easily implement identical mapping that could be used for a "sanity" debugging mode. Identical mapping doesn't bind scripts to resources and displays VM scripts "as is".
Comment 1 Pavel Podivilov 2012-02-21 11:11:48 PST
Created attachment 128002 [details]
Path.

This patch moves RawSourceCode towards SourceMapping interface defined in previous comment.