Index: lib/ui.js |
=================================================================== |
--- a/lib/ui.js |
+++ b/lib/ui.js |
@@ -155,17 +155,17 @@ let optionsObserver = |
addCommandHandler("adblockplus-showinaddonbar", handler); |
addCommandHandler("adblockplus-showintoolbar", handler); |
} |
let list = doc.getElementById("adblockplus-subscription-list"); |
if (list) |
{ |
// Load subscriptions data |
- let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest); |
+ let request = new XMLHttpRequest(); |
request.mozBackgroundRequest = true; |
request.open("GET", "chrome://adblockplus/content/ui/subscriptions.xml"); |
request.addEventListener("load", function() |
{ |
if (onShutdown.done) |
return; |
let currentSubscription = FilterStorage.subscriptions.filter( |
@@ -279,17 +279,17 @@ let UI = exports.UI = |
init: function() |
{ |
// We should call initDone once both overlay and filters are loaded |
let overlayLoaded = false; |
let filtersLoaded = false; |
let sessionRestored = false; |
// Start loading overlay |
- let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIJSXMLHttpRequest); |
+ let request = new XMLHttpRequest(); |
request.mozBackgroundRequest = true; |
request.open("GET", "chrome://adblockplus/content/ui/overlay.xul"); |
request.addEventListener("load", function(event) |
{ |
if (onShutdown.done) |
return; |
this.processOverlay(request.responseXML.documentElement); |
@@ -789,17 +789,17 @@ let UI = exports.UI = |
"data:application/vnd.mozilla.xul+xml," + encodeURIComponent(dialogSource), |
"_blank", "chrome,centerscreen,resizable,dialog=no", null); |
} |
} |
if (addSubscription) |
{ |
// Load subscriptions data |
- let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest); |
+ let request = new XMLHttpRequest(); |
request.mozBackgroundRequest = true; |
request.open("GET", "chrome://adblockplus/content/ui/subscriptions.xml"); |
request.addEventListener("load", function() |
{ |
if (onShutdown.done) |
return; |
let node = Utils.chooseFilterSubscription(request.responseXML.getElementsByTagName("subscription")); |