Title: [242929] trunk/Source/WebInspectorUI
- Revision
- 242929
- Author
- drou...@apple.com
- Date
- 2019-03-13 18:35:35 -0700 (Wed, 13 Mar 2019)
Log Message
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
<rdar://problem/48853820>
Reviewed by Antoine Quint.
* UserInterface/Models/Script.js:
(WI.Script.prototype._resolveResource):
If the page's URL has a query parameter, the payload we receive for any inline <script>s
doesn't include the query parameter as part of its URL. As such, if there isn't an existing
resource with a URL that exactly matches the URL of the script and if the URL of the main
resource for the script's target starts with the URL of the script, we assume that the
script "belongs" to the target's main resource and associate the script with it as such.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (242928 => 242929)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-03-14 01:09:42 UTC (rev 242928)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-03-14 01:35:35 UTC (rev 242929)
@@ -1,3 +1,19 @@
+2019-03-13 Devin Rousso <drou...@apple.com>
+
+ 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
+ <rdar://problem/48853820>
+
+ Reviewed by Antoine Quint.
+
+ * UserInterface/Models/Script.js:
+ (WI.Script.prototype._resolveResource):
+ If the page's URL has a query parameter, the payload we receive for any inline <script>s
+ doesn't include the query parameter as part of its URL. As such, if there isn't an existing
+ resource with a URL that exactly matches the URL of the script and if the URL of the main
+ resource for the script's target starts with the URL of the script, we assume that the
+ script "belongs" to the target's main resource and associate the script with it as such.
+
2019-03-13 Keith Rollin <krol...@apple.com>
Add support for new StagedFrameworks layout
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Script.js (242928 => 242929)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Script.js 2019-03-14 01:09:42 UTC (rev 242928)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Script.js 2019-03-14 01:35:35 UTC (rev 242929)
@@ -276,6 +276,13 @@
}
} catch { }
+ if (!this.isMainResource()) {
+ for (let frame of WI.networkManager.frames) {
+ if (frame.mainResource.type === WI.Resource.Type.Document && frame.mainResource.url.startsWith(this._url))
+ return frame.mainResource;
+ }
+ }
+
return null;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes