Bug 96088

Summary: Web Inspector: support empty entries in source maps.
Product: WebKit Reporter: Pavel Podivilov <podivilov>
Component: Web Inspector (Deprecated)Assignee: Pavel Podivilov <podivilov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch vsevik: review+

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>