Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/downloader.js

Issue 11239001: Use XMLHttpRequest constructor in JS modules (Closed)
Patch Set: Created July 25, 2013, 12:36 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .hgsubstate ('k') | lib/io.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/downloader.js
===================================================================
--- a/lib/downloader.js
+++ b/lib/downloader.js
@@ -243,17 +243,17 @@ Downloader.prototype =
}
this.onDownloadError(downloadable, downloadURL, error, channelStatus, responseStatus, redirectCallback);
}
}.bind(this);
try
{
- request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
+ request = new XMLHttpRequest();
request.mozBackgroundRequest = true;
request.open("GET", downloadURL);
}
catch (e)
{
errorCallback("synchronize_invalid_url");
return;
}
« no previous file with comments | « .hgsubstate ('k') | lib/io.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld