RESOLVED FIXED 150009
Web Inspector: Line error widget showed in the wrong resource
https://bugs.webkit.org/show_bug.cgi?id=150009
Summary Web Inspector: Line error widget showed in the wrong resource
Nikita Vasilyev
Reported 2015-10-10 21:24:27 PDT
Created attachment 262846 [details] [Image] Bug Steps: 1. Open http://nv.github.io/webkit-inspector-bugs/React-JSXTransformer/ 2. Open Resources tab 3. Select the main HTML resource Actual: JS error "Can't find variable: nope" showed in the wrong (HTML) file. Expected: The error should only be showed in the JS file.
Attachments
[Image] Bug (195.83 KB, image/png)
2015-10-10 21:24 PDT, Nikita Vasilyev
no flags
[PATCH] Proposed Fix (27.16 KB, patch)
2016-04-25 14:26 PDT, Joseph Pecoraro
timothy: review+
buildbot: commit-queue-
[IMAGE] Before - Format String (94.94 KB, image/png)
2016-04-25 14:27 PDT, Joseph Pecoraro
no flags
[IMAGE] After - Format String (99.10 KB, image/png)
2016-04-25 14:27 PDT, Joseph Pecoraro
no flags
Archive of layout-test-results from ews100 for mac-yosemite (947.56 KB, application/zip)
2016-04-25 14:55 PDT, Build Bot
no flags
Radar WebKit Bug Importer
Comment 1 2015-10-10 21:24:43 PDT
Joseph Pecoraro
Comment 2 2015-10-20 11:11:55 PDT
Is this the same as bug 150010?
Nikita Vasilyev
Comment 3 2015-10-20 15:19:32 PDT
(In reply to comment #2) > Is this the same as bug 150010? They are different from the user's perspective. I don't know if the underling issue is the same.
Nikita Vasilyev
Comment 4 2015-10-20 15:21:24 PDT
(In reply to comment #3) > (In reply to comment #2) > > Is this the same as bug 150010? > > They are different from the user's perspective. I don't know if the > underling issue is the same. *underlying issue
Timothy Hatcher
Comment 5 2016-03-03 13:50:13 PST
This looks like a backend issue where we report an error on the main resource URL with a line number from the script.
Joseph Pecoraro
Comment 6 2016-04-22 21:10:41 PDT
*** Bug 142553 has been marked as a duplicate of this bug. ***
Joseph Pecoraro
Comment 7 2016-04-25 14:26:51 PDT
Created attachment 277277 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 8 2016-04-25 14:27:08 PDT
Created attachment 277278 [details] [IMAGE] Before - Format String
Joseph Pecoraro
Comment 9 2016-04-25 14:27:24 PDT
Created attachment 277279 [details] [IMAGE] After - Format String
Joseph Pecoraro
Comment 10 2016-04-25 14:28:37 PDT
Including images showing the drive-by format fixes also addressed by this.
Build Bot
Comment 11 2016-04-25 14:55:40 PDT
Comment on attachment 277277 [details] [PATCH] Proposed Fix Attachment 277277 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1219701 New failing tests: fast/layers/no-clipping-overflow-hidden-added-after-transform.html
Build Bot
Comment 12 2016-04-25 14:55:44 PDT
Created attachment 277281 [details] Archive of layout-test-results from ews100 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-yosemite Platform: Mac OS X 10.10.5
Joseph Pecoraro
Comment 13 2016-04-25 16:33:11 PDT
Comment on attachment 277277 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=277277&action=review > Source/WebInspectorUI/UserInterface/Controllers/IssueManager.js:45 > + if (sourceCode instanceof WebInspector.Script) > + return issue.url === sourceCode.url || (issue.sourceCodeLocation && issue.sourceCodeLocation.sourceCode === sourceCode); I think I should drop the url comparison here, or fallback to it if the sourceCodeLocation is unavailable. Otherwise, two dynamically added <script>s will both show this issue, even if the sourceCode specifically matches one of them.
Timothy Hatcher
Comment 14 2016-04-25 17:16:56 PDT
Comment on attachment 277277 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=277277&action=review >> Source/WebInspectorUI/UserInterface/Controllers/IssueManager.js:45 >> + return issue.url === sourceCode.url || (issue.sourceCodeLocation && issue.sourceCodeLocation.sourceCode === sourceCode); > > I think I should drop the url comparison here, or fallback to it if the sourceCodeLocation is unavailable. Otherwise, two dynamically added <script>s will both show this issue, even if the sourceCode specifically matches one of them. Maybe we should nullify SourceCode's url for dynamic scripts after we associate things? Though it likely makes sense to just drop this compare too.
Joseph Pecoraro
Comment 15 2016-04-25 17:45:36 PDT
Note You need to log in before you can comment on or make changes to this bug.