Index: lib/synchronizer.js |
=================================================================== |
--- a/lib/synchronizer.js |
+++ b/lib/synchronizer.js |
@@ -286,17 +286,17 @@ let Synchronizer = exports.Synchronizer |
let {addonVersion} = require("info"); |
fallbackURL = fallbackURL.replace(/%VERSION%/g, encodeURIComponent(addonVersion)); |
fallbackURL = fallbackURL.replace(/%SUBSCRIPTION%/g, encodeURIComponent(subscription.url)); |
fallbackURL = fallbackURL.replace(/%URL%/g, encodeURIComponent(downloadURL)); |
fallbackURL = fallbackURL.replace(/%ERROR%/g, encodeURIComponent(error)); |
fallbackURL = fallbackURL.replace(/%CHANNELSTATUS%/g, encodeURIComponent(channelStatus)); |
fallbackURL = fallbackURL.replace(/%RESPONSESTATUS%/g, encodeURIComponent(responseStatus)); |
- let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest); |
+ let request = new XMLHttpRequest(); |
request.mozBackgroundRequest = true; |
request.open("GET", fallbackURL); |
request.overrideMimeType("text/plain"); |
request.channel.loadFlags = request.channel.loadFlags | |
request.channel.INHIBIT_CACHING | |
request.channel.VALIDATE_ALWAYS; |
request.addEventListener("load", function(ev) |
{ |