RESOLVED INVALID 111688
Web Inspector: Details of InjectedScript function call shall not be linkified in Timeline panel.
https://bugs.webkit.org/show_bug.cgi?id=111688
Summary Web Inspector: Details of InjectedScript function call shall not be linkified...
pdeng6
Reported 2013-03-06 23:01:45 PST
Currently, details of InjectedScript function call is linkified, but actually, no valid resource provided for it, see attachment 1. when user click the link, "This page is not available" will pop up, see attachement 2. I suggest remove the link and line number in this case :) Thanks Pan
Attachments
Link of InjectedScript function call (68.68 KB, image/png)
2013-03-06 23:03 PST, pdeng6
no flags
error page that the invalid link lead to (54.29 KB, image/png)
2013-03-06 23:04 PST, pdeng6
no flags
Patch (16.84 KB, patch)
2013-03-06 23:07 PST, pdeng6
no flags
Patch (4.19 KB, patch)
2013-03-11 23:30 PDT, pdeng6
no flags
Patch (4.00 KB, patch)
2013-03-12 18:56 PDT, pdeng6
vsevik: review-
pdeng6
Comment 1 2013-03-06 23:03:29 PST
Created attachment 191925 [details] Link of InjectedScript function call
pdeng6
Comment 2 2013-03-06 23:04:58 PST
Created attachment 191926 [details] error page that the invalid link lead to
pdeng6
Comment 3 2013-03-06 23:07:35 PST
Pavel Feldman
Comment 4 2013-03-07 01:30:59 PST
Comment on attachment 191927 [details] Patch I think this edge case is to minor to special case / plumb callFromInjectedScript with it.
pdeng6
Comment 5 2013-03-11 23:30:11 PDT
pdeng6
Comment 6 2013-03-11 23:35:30 PDT
(In reply to comment #4) > (From update of attachment 191927 [details]) > I think this edge case is to minor to special case / plumb callFromInjectedScript with it. yes, to avoid plumb things, I suggest only make funcitonCall link for valid script url. It also solve the invalid link "undefined:1" besides "InjectedScript:1" :) Thanks! Pan
Alexander Pavlov (apavlov)
Comment 7 2013-03-12 04:28:01 PDT
Comment on attachment 192652 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192652&action=review > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1127 > + * @return {true|false} {boolean} > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1133 > + var parsedURL = new WebInspector.ParsedURL(this.scriptName); You can make use of String.prototype.asParsedURL found in ParsedURL.js and rewrite this as: this._validScriptLocation = !!this.scriptName.asParsedURL(); > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1135 > + } else { Please remove curly braces around a single-line block. > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1140 > + return this._validScriptLocation; Extraneous whitespace after "return"
pdeng6
Comment 8 2013-03-12 18:56:08 PDT
pdeng6
Comment 9 2013-03-12 18:58:25 PDT
(In reply to comment #7) > (From update of attachment 192652 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=192652&action=review > > > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1127 > > + * @return {true|false} > > {boolean} > Done > > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1133 > > + var parsedURL = new WebInspector.ParsedURL(this.scriptName); > > You can make use of String.prototype.asParsedURL found in ParsedURL.js and rewrite this as: > > this._validScriptLocation = !!this.scriptName.asParsedURL(); > Done, thanks a lot for guidance! > > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1135 > > + } else { > > Please remove curly braces around a single-line block. > Done > > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1140 > > + return this._validScriptLocation; > > Extraneous whitespace after "return" Done, Thanks! Pan
pdeng6
Comment 10 2013-03-15 00:00:34 PDT
Comment on attachment 192854 [details] Patch @apavlov, could you please help review this patch? thanks Pan
Vsevolod Vlasov
Comment 11 2013-03-15 01:34:51 PDT
Comment on attachment 192854 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=192854&action=review > Source/WebCore/inspector/front-end/TimelinePresentationModel.js:1132 > + this._validScriptLocation = this.scriptName ? !!this.scriptName.asParsedURL() : false; I think it's possible that a script with the name that could not be correctly parsed can still be correctly linkified (think sourceURL). Such false negative would be a much worse issue than current false positive behavior.
Brian Burg
Comment 12 2014-12-12 13:28:58 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests. Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.
Note You need to log in before you can comment on or make changes to this bug.