Index: lib/io.js |
=================================================================== |
--- a/lib/io.js |
+++ b/lib/io.js |
@@ -68,18 +68,18 @@ let IO = exports.IO = |
*/ |
readFromFile: function(/**nsIFile|nsIURI*/ file, /**Boolean*/ decode, /**Object*/ listener, /**Function*/ callback, /**String*/ timeLineID) |
{ |
try |
{ |
let buffer = ""; |
let uri = file instanceof Ci.nsIFile ? Services.io.newFileURI(file) : file; |
let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest); |
+ request.mozBackgroundRequest = true; |
request.open("GET", uri.spec); |
- request.mozBackgroundRequest = true; |
request.responseType = "moz-chunked-text"; |
request.overrideMimeType("text/plain" + (decode ? "? charset=utf-8" : "")); |
request.addEventListener("progress", function(event) |
{ |
if (timeLineID) |
{ |
TimeLine.asyncStart(timeLineID); |