Summary: | Web Inspector: MainScriptMapping should detect snippet scripts by means of sourceURL set before evaluation. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Vsevolod Vlasov <vsevik> | ||||||||||
Component: | Web Inspector (Deprecated) | Assignee: | Vsevolod Vlasov <vsevik> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, podivilov, rik, timothy, yurys | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 75094 | ||||||||||||
Attachments: |
|
Description
Vsevolod Vlasov
2012-03-13 13:37:04 PDT
Created attachment 131901 [details]
Patch
Created attachment 131902 [details]
Patch
podivilov@, could you please take a look? Comment on attachment 131902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=131902&action=review > Source/WebCore/inspector/front-end/SnippetsModel.js:140 > + var sourceURL = this.sourceURLForSnippet(snippet, evaluationIndex); Please inline sourceURLForSnippet here and set snippet.sourceURL = sourceURL. > Source/WebCore/inspector/front-end/SnippetsModel.js:153 > + for (var i = 0; i < this._snippets.length; ++i) { Why not making this._snippets a map? > Source/WebCore/inspector/front-end/SnippetsModel.js:192 > + var snippetId = this.snippetIdForSourceURL(sourceURL); Please inline snippetIdForSourceURL here. > Source/WebCore/inspector/front-end/SnippetsModel.js:240 > + get lastEvaluationSourceURL() Please remove this public getter, all you need is a private field that is used solely by SnippetModel. > Source/WebCore/inspector/front-end/SnippetsModel.js:414 > + uiSourceCode.snippet = snippet; This looks wrong. Created attachment 132060 [details]
Patch
Comment on attachment 132060 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132060&action=review looks good! > Source/WebCore/inspector/front-end/SnippetsModel.js:153 > snippetIdForSourceURL: function(sourceURL) Please make it private. Created attachment 132068 [details]
Patch
> > Source/WebCore/inspector/front-end/SnippetsModel.js:153
> > snippetIdForSourceURL: function(sourceURL)
>
> Please make it private.
It is used in MainScriptMapping to detect snippet scripts.
Committed r110864: <http://trac.webkit.org/changeset/110864> |