RESOLVED FIXED 195705
Web Inspector: Debugger: pausing in an inline script on a page with a URL query creates an Extra Script
https://bugs.webkit.org/show_bug.cgi?id=195705
Summary Web Inspector: Debugger: pausing in an inline script on a page with a URL que...
Devin Rousso
Reported 2019-03-13 15:14:45 PDT
# STEPS TO REPRODUCE: 1. inspect <https://peoplesoakland.mysalononline.com/Booking/?sid=0&guid=fe74f67f-6863-4671-bbb9-704ef70e163e> 2. tap on the date to show the calendar 3. select the <div.k-calendar> node 4. set a breakpoint in the "mousedown" event listener registered on this node 5. Tap anywhere in the calendar
Attachments
Patch (2.03 KB, patch)
2019-03-13 15:20 PDT, Devin Rousso
no flags
Patch (2.01 KB, patch)
2019-03-13 17:56 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-03-13 15:14:54 PDT
Devin Rousso
Comment 2 2019-03-13 15:20:33 PDT
Antoine Quint
Comment 3 2019-03-13 15:24:51 PDT
Comment on attachment 364581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=364581&action=review > Source/WebInspectorUI/UserInterface/Models/Script.js:280 > + let mainResource = this._target === WI.mainTarget ? WI.networkManager.mainFrame.mainResource : this._target.mainResource; Not sure if there's a coding style I don't know about, but technically `const` here would work since mainResource is not re-assigned.
Devin Rousso
Comment 4 2019-03-13 15:26:58 PDT
Comment on attachment 364581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=364581&action=review >> Source/WebInspectorUI/UserInterface/Models/Script.js:280 >> + let mainResource = this._target === WI.mainTarget ? WI.networkManager.mainFrame.mainResource : this._target.mainResource; > > Not sure if there's a coding style I don't know about, but technically `const` here would work since mainResource is not re-assigned. The style that I've known for Web Inspector is that we only use `const` for things that won't change across executions. We use `const` almost like one would expect `static`. FWIW, `let` is also less characters than `const` :P
Joseph Pecoraro
Comment 5 2019-03-13 15:38:02 PDT
Comment on attachment 364581 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=364581&action=review > Source/WebInspectorUI/UserInterface/Models/Script.js:283 > + if (this._target && !this.isMainResource()) { > + let mainResource = this._target === WI.mainTarget ? WI.networkManager.mainFrame.mainResource : this._target.mainResource; > + if (mainResource && mainResource.url.startsWith(this._url)) > + return mainResource; > + } Shouldn't this check each Frame's document resource URLs? What if this was a <script> in a sub-frame's document?
Devin Rousso
Comment 6 2019-03-13 17:56:17 PDT
WebKit Commit Bot
Comment 7 2019-03-13 18:35:40 PDT
Comment on attachment 364598 [details] Patch Clearing flags on attachment: 364598 Committed r242929: <https://trac.webkit.org/changeset/242929>
WebKit Commit Bot
Comment 8 2019-03-13 18:35:41 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.