RESOLVED FIXED 149922
Web Inspector: Stack trace view doesn't properly display lines without function names
https://bugs.webkit.org/show_bug.cgi?id=149922
Summary Web Inspector: Stack trace view doesn't properly display lines without functi...
Nikita Vasilyev
Reported 2015-10-08 04:18:44 PDT
Image: https://bugs.webkit.org/attachment.cgi?id=262414. Note how the last line of the stack trace didn't get parsed correctly. Expected: (anonymous function) - error-prefix.html:27 Actual: Full path, cannot be clicked.
Attachments
[HTML] Reduction (601 bytes, text/html)
2015-10-08 04:24 PDT, Nikita Vasilyev
no flags
Patch (3.11 KB, patch)
2015-10-08 04:28 PDT, Nikita Vasilyev
timothy: review+
nvasilyev: commit-queue-
Patch (with a test) (5.99 KB, patch)
2015-10-08 22:10 PDT, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2015-10-08 04:18:59 PDT
Nikita Vasilyev
Comment 2 2015-10-08 04:24:03 PDT
Created attachment 262686 [details] [HTML] Reduction
Nikita Vasilyev
Comment 3 2015-10-08 04:28:23 PDT
Timothy Hatcher
Comment 4 2015-10-08 07:55:23 PDT
Comment on attachment 262687 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=262687&action=review > Source/WebInspectorUI/UserInterface/Models/StackTrace.js:65 > + ({url, lineNumber, columnNumber} = WebInspector.StackTrace._parseLocation(line.slice(atIndex + 1))); Is the wrapping () needed here? > Source/WebInspectorUI/UserInterface/Models/StackTrace.js:67 > + ({url, lineNumber, columnNumber} = WebInspector.StackTrace._parseLocation(line)); Ditto.
Joseph Pecoraro
Comment 5 2015-10-08 11:23:36 PDT
Comment on attachment 262687 [details] Patch It looks like this can be tested. Can we write a test for it?
Nikita Vasilyev
Comment 6 2015-10-08 22:08:47 PDT
(In reply to comment #4) > Comment on attachment 262687 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=262687&action=review > > > Source/WebInspectorUI/UserInterface/Models/StackTrace.js:65 > > + ({url, lineNumber, columnNumber} = WebInspector.StackTrace._parseLocation(line.slice(atIndex + 1))); > > Is the wrapping () needed here? > > > Source/WebInspectorUI/UserInterface/Models/StackTrace.js:67 > > + ({url, lineNumber, columnNumber} = WebInspector.StackTrace._parseLocation(line)); > > Ditto. Yes! I was surprised to discover this too. var x = 0; {x} = {x: 2}; // SyntaxError: Unexpected token '=' console.info(x); This, however, works as you'd expect: var {x} = {x: 2}; console.info(x); // 2
Nikita Vasilyev
Comment 7 2015-10-08 22:10:57 PDT
Created attachment 262747 [details] Patch (with a test)
WebKit Commit Bot
Comment 8 2015-10-08 23:02:02 PDT
Comment on attachment 262747 [details] Patch (with a test) Clearing flags on attachment: 262747 Committed r190780: <http://trac.webkit.org/changeset/190780>
WebKit Commit Bot
Comment 9 2015-10-08 23:02:07 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.