Bug 96088 - Web Inspector: support empty entries in source maps.
Summary: Web Inspector: support empty entries in source maps.
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-09-07 02:38 PDT by Pavel Podivilov
Modified: 2012-09-10 07:50 PDT (History)
10 users (show)

See Also:


Attachments
Patch (10.26 KB, patch)
2012-09-07 02:39 PDT, Pavel Podivilov
vsevik: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2012-09-07 02:38:06 PDT
Web Inspector: support empty entries in source maps.

Empty entries should be mapped to the compiled script.
Comment 1 Pavel Podivilov 2012-09-07 02:39:42 PDT
Created attachment 162716 [details]
Patch
Comment 2 Vsevolod Vlasov 2012-09-07 05:49:40 PDT
Comment on attachment 162716 [details]
Patch

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

> Source/WebCore/inspector/front-end/CompilerScriptMapping.js:44
> +    this._originalUISourceCodeForScriptId = {};

Can we reuse this._uiSourceCodeByURL ?

> Source/WebCore/inspector/front-end/CompilerScriptMapping.js:87
>          var result = [];

uiSourceCodes() method is now used for tests only so I would get rid of it altogether.

> LayoutTests/http/tests/inspector/compiler-script-mapping.html:142
>              InspectorTest.checkUILocation(uiSourceCodeList[0], 4, 4, mapping.rawLocationToUILocation(WebInspector.debuggerModel.createRawLocation(script, 0, 81)));

Shouldn't we do some checkUILocation/checkRawLocation for empty entries case?
Comment 3 Pavel Podivilov 2012-09-10 07:36:12 PDT
Comment on attachment 162716 [details]
Patch

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

>> Source/WebCore/inspector/front-end/CompilerScriptMapping.js:44
>> +    this._originalUISourceCodeForScriptId = {};
> 
> Can we reuse this._uiSourceCodeByURL ?

That way inline and anonymous scripts won't be shown correctly.

>> Source/WebCore/inspector/front-end/CompilerScriptMapping.js:87
>>          var result = [];
> 
> uiSourceCodes() method is now used for tests only so I would get rid of it altogether.

done.

>> LayoutTests/http/tests/inspector/compiler-script-mapping.html:142
>>              InspectorTest.checkUILocation(uiSourceCodeList[0], 4, 4, mapping.rawLocationToUILocation(WebInspector.debuggerModel.createRawLocation(script, 0, 81)));
> 
> Shouldn't we do some checkUILocation/checkRawLocation for empty entries case?

Added a check for empty entry.
Comment 4 Pavel Podivilov 2012-09-10 07:50:33 PDT
Committed r128061: <http://trac.webkit.org/changeset/128061>