Bug 778002: Identity should use createInstance, not getService, to get an XHR. r=me
authorJed Parsons <jparsons@mozilla.com>
Mon, 30 Jul 2012 15:14:30 -0700
changeset 100906 f6f7358234b344499f1eff580f5c1503516e5a1b
parent 100905 205889645965ca5008311a04266917f20d408c55
child 100907 13f1c1c06438e052d1813292d6615c431777dea2
push idunknown
push userunknown
push dateunknown
reviewersme
bugs778002
milestone17.0a1
Bug 778002: Identity should use createInstance, not getService, to get an XHR. r=me
toolkit/identity/Identity.jsm
--- a/toolkit/identity/Identity.jsm
+++ b/toolkit/identity/Identity.jsm
@@ -250,17 +250,17 @@ IDService.prototype = {
    */
   _fetchWellKnownFile: function _fetchWellKnownFile(aDomain, aCallback, aScheme='https') {
     // XXX bug 769854 make tests https and remove aScheme option
     let url = aScheme + '://' + aDomain + "/.well-known/browserid";
     log("_fetchWellKnownFile:", url);
 
     // this appears to be a more successful way to get at xmlhttprequest (which supposedly will close with a window
     let req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
-                .getService(Ci.nsIXMLHttpRequest);
+                .createInstance(Ci.nsIXMLHttpRequest);
 
     // XXX bug 769865 gracefully handle being off-line
     // XXX bug 769866 decide on how to handle redirects
     req.open("GET", url, true);
     req.responseType = "json";
     req.mozBackgroundRequest = true;
     req.onload = function _fetchWellKnownFile_onload() {
       if (req.status < 200 || req.status >= 400) {