Bug 1584461 - Load overlay documents in the same docGroup as the document they overlay; rs=bustage-fix
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 27 Sep 2019 22:17:10 +1200
changeset 27746 0a85c390008bd3af3c660594a56b40d8ee56ffb2
parent 27745 0b9deb429ea6f13079c01dc00081401326daf368
child 27747 1afb9472fd8a4a97aa3aff7439f34d631ec94297
push id16474
push usergeoff@darktrojan.net
push dateFri, 27 Sep 2019 10:59:19 +0000
treeherdercomm-central@1afb9472fd8a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix
bugs1584461
Bug 1584461 - Load overlay documents in the same docGroup as the document they overlay; rs=bustage-fix
common/src/Overlays.jsm
--- a/common/src/Overlays.jsm
+++ b/common/src/Overlays.jsm
@@ -470,17 +470,17 @@ class Overlays {
    */
   fetchOverlay(srcUrl) {
     if (!srcUrl.startsWith("chrome://") && !srcUrl.startsWith("resource://")) {
       throw new Error(
         "May only load overlays from chrome:// or resource:// uris"
       );
     }
 
-    let xhr = new XMLHttpRequest();
+    let xhr = new this.window.XMLHttpRequest();
     xhr.overrideMimeType("application/xml");
     xhr.open("GET", srcUrl, false);
 
     // Elevate the request, so DTDs will work. Should not be a security issue since we
     // only load chrome, resource and file URLs, and that is our privileged chrome package.
     try {
       xhr.channel.owner = Services.scriptSecurityManager.getSystemPrincipal();
     } catch (ex) {