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

Unified Diff: third_party/WebKit/Source/devtools/front_end/host/ResourceLoader.js

Issue 2032013003: [DevTools] Fix problem with loading source maps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/host/ResourceLoader.js
diff --git a/third_party/WebKit/Source/devtools/front_end/host/ResourceLoader.js b/third_party/WebKit/Source/devtools/front_end/host/ResourceLoader.js
index 501eb38d7f3e55251ab96c4ded0aed95763d053b..629684e2e996299581ba2179a4417e4b6505bc6f 100644
--- a/third_party/WebKit/Source/devtools/front_end/host/ResourceLoader.js
+++ b/third_party/WebKit/Source/devtools/front_end/host/ResourceLoader.js
@@ -30,10 +30,21 @@ WebInspector.ResourceLoader._discardOutputStream = function(id)
/**
* @param {number} id
* @param {string} chunk
+ * @param {boolean=} encoded
*/
-WebInspector.ResourceLoader.streamWrite = function(id, chunk)
+WebInspector.ResourceLoader.streamWrite = function(id, chunk, encoded)
{
- WebInspector.ResourceLoader._boundStreams[id].write(chunk);
+ if (encoded) {
+ var request = new XMLHttpRequest();
+ request.open("GET", "data:text/plain;base64," + chunk, false);
dgozman 2016/06/02 22:32:12 Let's create a helper function in utilities.js.
kozy 2016/06/02 23:00:20 Done.
+ request.send(null);
+ if (request.status === 200)
+ WebInspector.ResourceLoader._boundStreams[id].write(request.responseText);
+ else
+ console.error("Error while decoding chunk in ResourceLoader");
+ } else {
+ WebInspector.ResourceLoader._boundStreams[id].write(chunk);
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698