Chromium Code Reviews| 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); |
| + } |
| } |
| /** |