Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js

Issue 1583383003: [DevTools] Send source map content from frontend to backend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blackbox-inline-source-map
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
index 6c4fae370782e97e5f7a552829f5a53fc057ec11..fb9905abffd3c7fd6232bf3c851d014e621ab558 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js
@@ -89,9 +89,10 @@ WebInspector.SourceMap = function(compiledURL, sourceMappingURL, payload)
* @param {string} sourceMapURL
* @param {string} compiledURL
* @param {function(?WebInspector.SourceMap)} callback
+ * @param {function(string)=} contentCallback
* @this {WebInspector.SourceMap}
*/
-WebInspector.SourceMap.load = function(sourceMapURL, compiledURL, callback)
+WebInspector.SourceMap.load = function(sourceMapURL, compiledURL, callback, contentCallback)
{
WebInspector.multitargetNetworkManager.loadResource(sourceMapURL, contentLoaded);
@@ -109,6 +110,7 @@ WebInspector.SourceMap.load = function(sourceMapURL, compiledURL, callback)
if (content.slice(0, 3) === ")]}")
content = content.substring(content.indexOf('\n'));
+ if (contentCallback) contentCallback(content);
pfeldman 2016/01/19 19:35:04 Looks like a hack, you should reuse the only callb
kozy 2016/01/20 00:41:22 Done.
try {
var payload = /** @type {!SourceMapV3} */ (JSON.parse(content));
var baseURL = sourceMapURL.startsWith("data:") ? compiledURL : sourceMapURL;

Powered by Google App Engine
This is Rietveld 408576698