RESOLVED FIXED71114
Web Inspector: do not map scripts generated with document.write to the document resources.
https://bugs.webkit.org/show_bug.cgi?id=71114
Summary Web Inspector: do not map scripts generated with document.write to the docume...
Pavel Feldman
Reported 2011-10-28 06:34:54 PDT
Patch to follow.
Attachments
Patch (13.53 KB, patch)
2011-10-28 08:55 PDT, Pavel Feldman
no flags
Patch (23.78 KB, patch)
2011-10-31 03:21 PDT, Pavel Feldman
no flags
Pavel Feldman
Comment 1 2011-10-28 08:55:15 PDT
Yury Semikhatsky
Comment 2 2011-10-31 02:05:21 PDT
Comment on attachment 112871 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=112871&action=review > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:116 > + if (script.sourceURL && script.lineOffset !== 0 && script.columnOffset !== 0) { Can we extract "script.lineOffset !== 0 && script.columnOffset !== 0" into script.isInlineScript() or something? It is used quite often in that sense. > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:146 > + this._rawSourceCode[script.scriptId] = rawSourceCode; _rawSourceCode -> _rawSourceCodeForScriptId? > Source/WebCore/inspector/front-end/Script.js:35 > + */ Revert this. > Source/WebCore/inspector/front-end/Script.js:47 > +WebInspector.Script._lastScriptId = 0; Remove this? > LayoutTests/inspector/debugger/bind-script-to-resource.html:55 > +Tests that only inline scripts are bound to the resource, while the ones generated with document.write are not. Bug 71099</a> It is not clear at first glance what the correct result is which means that this test can be erroneously rebaselined should it start failing. Can you add an explicit check for the error condition and print FAIL in that case or describe here which result should be considered correct.
Pavel Feldman
Comment 3 2011-10-31 03:21:43 PDT
Pavel Feldman
Comment 4 2011-10-31 04:56:18 PDT
Csaba Osztrogonác
Comment 5 2011-10-31 18:24:01 PDT
(In reply to comment #4) > Committed r98847: <http://trac.webkit.org/changeset/98847> It broke 3 inspector tests on Snow Leopard and on Qt bot: inspector/debugger/bind-script-to-resource.html inspector/debugger/linkifier.html inspector/debugger/source-frame-count.html Could you fix it please?
Csaba Osztrogonác
Comment 6 2011-11-02 04:39:58 PDT
Pavel Feldman
Comment 7 2011-11-03 09:28:46 PDT
Ryosuke Niwa
Comment 8 2011-11-04 09:50:41 PDT
It appears that this patch broke inspector/debugger/script-formatter.html http://build.webkit.org/builders/SnowLeopard%20Intel%20Release%20(Tests)/builds/34424
Note You need to log in before you can comment on or make changes to this bug.