Bug 792808 - Change asan-reporter bootstrap script to import and instantiate XHRs from global properties rather than using Cc.createInstance(Ci.nsIXMLHttpRequest); r=froydnj
authorThomas Wisniewski <wisniewskit@gmail.com>
Tue, 19 Sep 2017 12:17:39 -0400
changeset 404227 27b15eb83e9d22c868f8a486b4257870f40fd94e
parent 404226 ed441df27dadbf9dab6909f1292404a0142890a6
child 404228 56f9de9da69ae1fea95ae18be730b65f5386de59
push id99968
push userrgurzau@mozilla.com
push dateFri, 16 Feb 2018 22:14:56 +0000
treeherdermozilla-inbound@2e16779c96cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs792808
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 792808 - Change asan-reporter bootstrap script to import and instantiate XHRs from global properties rather than using Cc.createInstance(Ci.nsIXMLHttpRequest); r=froydnj MozReview-Commit-ID: GwciLYuTG3G
browser/extensions/asan-reporter/bootstrap.js
--- a/browser/extensions/asan-reporter/bootstrap.js
+++ b/browser/extensions/asan-reporter/bootstrap.js
@@ -7,21 +7,19 @@ const Cm = Components.manager;
 
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Log.jsm");
 ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
-const XMLHttpRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttprequest;1");
-
 ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
-Cu.importGlobalProperties(["TextDecoder"]);
+Cu.importGlobalProperties(["TextDecoder", "XMLHttpRequest"]);
 
 // Define our prefs
 const PREF_CLIENT_ID = "asanreporter.clientid";
 const PREF_API_URL = "asanreporter.apiurl";
 const PREF_AUTH_TOKEN = "asanreporter.authtoken";
 const PREF_LOG_LEVEL = "asanreporter.loglevel";
 
 // Setup logging