Title: [200806] trunk/Source/WebInspectorUI
Revision
200806
Author
[email protected]
Date
2016-05-12 18:24:50 -0700 (Thu, 12 May 2016)

Log Message

REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
https://bugs.webkit.org/show_bug.cgi?id=157650
<rdar://problem/26133763>

Patch by Joseph Pecoraro <[email protected]> on 2016-05-12
Reviewed by Timothy Hatcher.

* UserInterface/Controllers/SourceMapManager.js:
Wrong order of arguments. The intent was to pass the incoming
baseURL as the partialURL, because if it was not absolute by
that point we could make it relative to the main resource.
However we accidentally put the main resource as the partial
portion, which would just always return the main resource url.
Swap the order, so that if the incoming base is absolute
(such as a resource.url) that will be used, but if the
incoming base is relative (e.g. an incomplete sourceURL) we
can make it absolute with the main resource.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (200805 => 200806)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-05-13 00:55:57 UTC (rev 200805)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-05-13 01:24:50 UTC (rev 200806)
@@ -1,3 +1,22 @@
+2016-05-12  Joseph Pecoraro  <[email protected]>
+
+        REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
+        https://bugs.webkit.org/show_bug.cgi?id=157650
+        <rdar://problem/26133763>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Controllers/SourceMapManager.js:
+        Wrong order of arguments. The intent was to pass the incoming
+        baseURL as the partialURL, because if it was not absolute by
+        that point we could make it relative to the main resource.
+        However we accidentally put the main resource as the partial
+        portion, which would just always return the main resource url.
+        Swap the order, so that if the incoming base is absolute
+        (such as a resource.url) that will be used, but if the
+        incoming base is relative (e.g. an incomplete sourceURL) we
+        can make it absolute with the main resource.
+
 2016-05-12  Matt Baker  <[email protected]>
 
         Web Inspector: Uncaught exception when removing selected Timeline instrument

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js (200805 => 200806)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js	2016-05-13 00:55:57 UTC (rev 200805)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/SourceMapManager.js	2016-05-13 01:24:50 UTC (rev 200806)
@@ -47,7 +47,7 @@
         // The baseURL could have come from a "//# sourceURL". Attempt to get a
         // reasonable absolute URL for the base by using the main resource's URL.
         if (WebInspector.frameResourceManager.mainFrame)
-            baseURL = absoluteURL(WebInspector.frameResourceManager.mainFrame.url, baseURL);
+            baseURL = absoluteURL(baseURL, WebInspector.frameResourceManager.mainFrame.url);
 
         if (sourceMapURL.startsWith("data:")) {
             this._loadAndParseSourceMap(sourceMapURL, baseURL, originalSourceCode);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to