Backed out 2 changesets (bug 1415483) for multiple failures e.g. on test_message_manager_ipc.html. CLOSED TREE
authorCsoregi Natalia <ncsoregi@mozilla.com>
Tue, 11 Dec 2018 19:30:57 +0200
changeset 509936 546d25793dae31f48c220842163664034fd8e769
parent 509935 5a1ffa97bd6e982c8b24238540ac3de6deed9410
child 509937 4db0d3e10cb162b850e90948015a7ed99e18b0e5
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1415483
milestone66.0a1
backs outd00748de66fcf465e872d412c4b974aeff038605
8dea94258f54d938088a1da31d14376aac8e8db7
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
Backed out 2 changesets (bug 1415483) for multiple failures e.g. on test_message_manager_ipc.html. CLOSED TREE Backed out changeset d00748de66fc (bug 1415483) Backed out changeset 8dea94258f54 (bug 1415483)
accessible/tests/browser/.eslintrc.js
accessible/tests/mochitest/common.js
browser/base/content/test/popupNotifications/browser_displayURI.js
browser/base/content/test/siteIdentity/browser_secure_transport_insecure_scheme.js
browser/modules/test/unit/test_LiveBookmarkMigrator.js
devtools/.eslintrc.js
dom/filesystem/compat/tests/script_entries.js
dom/filesystem/tests/script_fileList.js
dom/indexedDB/test/test_message_manager_ipc.html
dom/indexedDB/test/unit/xpcshell-head-parent-process.js
mobile/android/tests/browser/robocop/testVideoControls.js
netwerk/test/httpserver/test/test_default_index_handler.js
security/sandbox/test/browser_bug1393259.js
taskcluster/docker/periodic-updates/scripts/genHPKPStaticPins.js
taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js
testing/marionette/test/unit/test_navigate.js
testing/mochitest/api.js
testing/modules/TestUtils.jsm
testing/specialpowers/content/SpecialPowersObserver.jsm
testing/specialpowers/content/specialpowersAPI.js
testing/talos/talos/startup_test/sessionrestore/addon/api.js
testing/talos/talos/talos-powers/api.js
testing/talos/talos/tests/devtools/addon/content/tests/.eslintrc.js
testing/xpcshell/head.js
toolkit/components/extensions/child/ext-userScripts.js
toolkit/components/extensions/test/mochitest/webrequest_test.jsm
toolkit/components/extensions/test/xpcshell/test_ext_contentscript_triggeringPrincipal.js
toolkit/components/extensions/test/xpcshell/test_ext_i18n_css.js
toolkit/components/extensions/test/xpcshell/test_ext_persistent_events.js
toolkit/components/extensions/test/xpcshell/test_ext_proxy_auth.js
toolkit/components/extensions/test/xpcshell/test_ext_proxy_onauthrequired.js
toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
toolkit/components/extensions/test/xpcshell/test_ext_schemas_manifest_permissions.js
toolkit/components/extensions/test/xpcshell/test_ext_schemas_privileged.js
toolkit/components/extensions/test/xpcshell/test_ext_webRequest_auth.js
toolkit/components/narrate/.eslintrc.js
toolkit/components/osfile/modules/ospath_unix.jsm
toolkit/components/osfile/modules/ospath_win.jsm
toolkit/components/passwordmgr/test/unit/test_recipes_content.js
toolkit/components/places/tests/PlacesTestUtils.jsm
toolkit/components/places/tests/head_common.js
toolkit/components/places/tests/history/test_remove.js
toolkit/components/places/tests/history/test_removeVisitsByFilter.js
toolkit/components/places/tests/migration/test_current_from_v34.js
toolkit/components/places/tests/sync/test_sync_utils.js
toolkit/components/places/tests/unit/test_async_transactions.js
toolkit/components/places/tests/unit/test_bookmarks_html_escape_entities.js
toolkit/modules/Console.jsm
toolkit/modules/Http.jsm
toolkit/modules/NewTabUtils.jsm
toolkit/modules/subprocess/Subprocess.jsm
toolkit/modules/subprocess/subprocess_common.jsm
toolkit/modules/subprocess/subprocess_unix.jsm
toolkit/modules/tests/modules/MockDocument.jsm
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_url_parameters.js
toolkit/mozapps/extensions/test/xpcshell/test_update.js
toolkit/mozapps/extensions/test/xpcshell/test_update_compatmode.js
tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js
tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
tools/lint/eslint/eslint-plugin-mozilla/package.json
tools/lint/eslint/eslint-plugin-mozilla/tests/reject-importGlobalProperties.js
--- a/accessible/tests/browser/.eslintrc.js
+++ b/accessible/tests/browser/.eslintrc.js
@@ -4,17 +4,17 @@ module.exports = {
   "extends": [
     "plugin:mozilla/browser-test"
   ],
   "globals": {
     "gBrowser": false
   },
   "rules": {
     "mozilla/no-aArgs": "error",
-    "mozilla/reject-importGlobalProperties": ["error", "everything"],
+    "mozilla/reject-importGlobalProperties": "error",
     "mozilla/var-only-at-top-level": "error",
 
     "block-scoped-var": "error",
     "camelcase": "error",
     "comma-dangle": ["error", "never"],
     "complexity": ["error", 20],
     "consistent-this": "off",
     "curly": ["error", "multi-line"],
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -45,16 +45,34 @@ const nsIAccessibleTraversalRule = Ci.ns
 const nsIAccessibleValue = Ci.nsIAccessibleValue;
 
 const nsIObserverService = Ci.nsIObserverService;
 
 const nsIDOMWindow = Ci.nsIDOMWindow;
 
 const nsIPropertyElement = Ci.nsIPropertyElement;
 
+// Testing "'Node' in this" doesn't do the right thing because there are cases
+// when our "this" is not the global even though we're at toplevel.  In those
+// cases, the import could fail because our global is a Window and we in fact
+// have a Node all along.
+//
+// We could get the global via the (function() { return this; })() trick, but
+// that might break any time if people switch us to strict mode.  So let's just
+// test the thing we care about directly: does bareword Node exist?
+let needToImportNode = false;
+try {
+    Node;
+} catch (e) {
+    needToImportNode = true;
+}
+if (needToImportNode) {
+    Cu.importGlobalProperties(["Node"]);
+}
+
 // //////////////////////////////////////////////////////////////////////////////
 // OS detect
 
 const MAC = (navigator.platform.includes("Mac"));
 const LINUX = (navigator.platform.includes("Linux"));
 const SOLARIS = (navigator.platform.includes("SunOS"));
 const WIN = (navigator.platform.includes("Win"));
 
--- a/browser/base/content/test/popupNotifications/browser_displayURI.js
+++ b/browser/base/content/test/popupNotifications/browser_displayURI.js
@@ -87,23 +87,26 @@ add_task(async function test_displayURI_
 add_task(async function test_displayURI_camera() {
   await check(async function() {
     content.navigator.mediaDevices.getUserMedia({video: true, fake: true});
   });
 });
 
 add_task(async function test_displayURI_geo_blob() {
   await check(async function() {
+    Cu.importGlobalProperties(["Blob"]);
     let text = "<script>navigator.geolocation.getCurrentPosition(() => {})</script>";
     let blob = new Blob([text], {type: "text/html"});
     let url = content.URL.createObjectURL(blob);
     content.location.href = url;
   }, {skipOnExtension: true});
 });
 
 add_task(async function test_displayURI_camera_blob() {
   await check(async function() {
+    Cu.importGlobalProperties(["Blob"]);
     let text = "<script>navigator.mediaDevices.getUserMedia({video: true, fake: true})</script>";
     let blob = new Blob([text], {type: "text/html"});
     let url = content.URL.createObjectURL(blob);
     content.location.href = url;
   }, {skipOnExtension: true});
 });
+
--- a/browser/base/content/test/siteIdentity/browser_secure_transport_insecure_scheme.js
+++ b/browser/base/content/test/siteIdentity/browser_secure_transport_insecure_scheme.js
@@ -9,16 +9,17 @@
 
 // But first, a quick test that we don't incorrectly treat a
 // blob:https://example.com URI as secure.
 add_task(async function() {
   let uri = getRootDirectory(gTestPath).replace("chrome://mochitests/content",
                                                 "https://example.com") + "dummy_page.html";
   await BrowserTestUtils.withNewTab(uri, async (browser) => {
     await ContentTask.spawn(browser, null, async () => {
+      Cu.importGlobalProperties(["Blob", "URL"]);
       let debug = {hello: "world"};
       let blob = new Blob([JSON.stringify(debug, null, 2)], {type: "application/json"});
       let blobUri = URL.createObjectURL(blob);
       content.document.location = blobUri;
     });
     await BrowserTestUtils.browserLoaded(browser);
     let identityMode = window.document.getElementById("identity-box").className;
     is(identityMode, "unknownIdentity", "identity should be 'unknown'");
--- a/browser/modules/test/unit/test_LiveBookmarkMigrator.js
+++ b/browser/modules/test/unit/test_LiveBookmarkMigrator.js
@@ -22,16 +22,18 @@ updateAppInfo({
   platformVersion: "",
 });
 
 const {PlacesUtils} =
   ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm", {});
 const {LiveBookmarkMigrator} =
   ChromeUtils.import("resource:///modules/LiveBookmarkMigrator.jsm", {});
 
+Cu.importGlobalProperties(["URL"]);
+
 const kTestData = {
   guid: PlacesUtils.bookmarks.toolbarGuid,
   children: [
     {type: PlacesUtils.bookmarks.TYPE_BOOKMARK, title: "BM 1", url: new URL("https://example.com/1")},
     {type: PlacesUtils.bookmarks.TYPE_FOLDER, title: "LB 1"},
     {type: PlacesUtils.bookmarks.TYPE_BOOKMARK, title: "BM 2", url: new URL("https://example.com/2")},
     {type: PlacesUtils.bookmarks.TYPE_FOLDER, title: "Regular old folder", children: [
       {type: PlacesUtils.bookmarks.TYPE_FOLDER, title: "LB child 1"},
@@ -157,8 +159,9 @@ add_task(async function check_replace_bo
       } else {
         Assert.ok(false, "Oy! No replacement for `" + bm.title + "` but we expected one!");
       }
     } else {
       Assert.ok(!replacement, "Shouldn't have kept the default bookmark items");
     }
   }
 });
+
--- a/devtools/.eslintrc.js
+++ b/devtools/.eslintrc.js
@@ -175,17 +175,17 @@ module.exports = {
   "rules": {
     // These are the rules that have been configured so far to match the
     // devtools coding style.
 
     // Rules from the mozilla plugin
     "mozilla/no-aArgs": "error",
     "mozilla/no-single-arg-cu-import": "error",
     // See bug 1224289.
-    "mozilla/reject-importGlobalProperties": ["error", "everything"],
+    "mozilla/reject-importGlobalProperties": "error",
     // devtools/shared/platform is special; see the README.md in that
     // directory for details.  We reject requires using explicit
     // subdirectories of this directory.
     "mozilla/reject-some-requires": ["error", "^devtools/shared/platform/(chome|content)/"],
     "mozilla/var-only-at-top-level": "error",
     "mozilla/use-chromeutils-import": ["error", {allowCu: true}],
 
     // Rules from the React plugin
--- a/dom/filesystem/compat/tests/script_entries.js
+++ b/dom/filesystem/compat/tests/script_entries.js
@@ -1,10 +1,9 @@
 /* eslint-env mozilla/frame-script */
-// eslint-disable-next-line mozilla/reject-importGlobalProperties
 Cu.importGlobalProperties(["File", "Directory"]);
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 var tmpFile, tmpDir;
 
 addMessageListener("entries.open", function(e) {
   tmpFile = Services.dirsvc.QueryInterface(Ci.nsIProperties).get("TmpD", Ci.nsIFile);
   tmpFile.append("file.txt");
   tmpFile.createUnique(Ci.nsIFile.FILE_TYPE, 0o600);
--- a/dom/filesystem/tests/script_fileList.js
+++ b/dom/filesystem/tests/script_fileList.js
@@ -1,10 +1,9 @@
 /* eslint-env mozilla/frame-script */
-// eslint-disable-next-line mozilla/reject-importGlobalProperties
 Cu.importGlobalProperties(["File"]);
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 function createProfDFile() {
   return Services.dirsvc.QueryInterface(Ci.nsIProperties).get("ProfD", Ci.nsIFile);
 }
 
 // Creates a parametric arity directory hierarchy as a function of depth.
 // Each directory contains one leaf file, and subdirectories of depth [1, depth).
--- a/dom/indexedDB/test/test_message_manager_ipc.html
+++ b/dom/indexedDB/test/test_message_manager_ipc.html
@@ -20,16 +20,18 @@ function childFrameScript() {
   const dbVersion = 1;
   const objStoreName = "bar";
   const key = 1;
 
   const blobData = ["So", " ", "many", " ", "blobs!"];
   const blobText = blobData.join("");
   const blobType = "text/plain";
 
+  Cu.importGlobalProperties(["indexedDB", "Blob"]);
+
   function info(msg) {
     sendAsyncMessage(mmName, { op: "info", msg });
   }
 
   function ok(condition, name, diag) {
     sendAsyncMessage(mmName,
                      { op: "ok",
                        condition,
--- a/dom/indexedDB/test/unit/xpcshell-head-parent-process.js
+++ b/dom/indexedDB/test/unit/xpcshell-head-parent-process.js
@@ -5,16 +5,18 @@
 
 // Tests using testGenerator are expected to define it themselves.
 /* global testGenerator */
 
 var { "classes": Cc, "interfaces": Ci, "utils": Cu } = Components;
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
+Cu.importGlobalProperties(["Blob"]);
+
 if (!("self" in this)) {
   this.self = this;
 }
 
 var bufferCache = [];
 
 function is(a, b, msg) {
   Assert.equal(a, b, msg);
@@ -42,17 +44,17 @@ if (!this.runTest) {
     if (SpecialPowers.isMainProcess()) {
       // XPCShell does not get a profile by default.
       do_get_profile();
 
       enableTesting();
       enableExperimental();
     }
 
-    Cu.importGlobalProperties(["indexedDB"]);
+    Cu.importGlobalProperties(["indexedDB", "Blob", "File", "FileReader"]);
 
     do_test_pending();
     testGenerator.next();
   };
 }
 
 function finishTest()
 {
--- a/mobile/android/tests/browser/robocop/testVideoControls.js
+++ b/mobile/android/tests/browser/robocop/testVideoControls.js
@@ -3,16 +3,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/SimpleServiceDiscovery.jsm");
 
+Cu.importGlobalProperties(["InspectorUtils"]);
+
 // The chrome window
 var chromeWin;
 
 // Track the <browser> where the tests are happening
 var browser;
 
 // The document of the video_controls web content
 var contentDocument;
--- a/netwerk/test/httpserver/test/test_default_index_handler.js
+++ b/netwerk/test/httpserver/test/test_default_index_handler.js
@@ -11,16 +11,18 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 var srv, dir, gDirEntries;
 
 XPCOMUtils.defineLazyGetter(this, "BASE_URL", function() {
   return "http://localhost:" + srv.identity.primaryPort + "/";
 });
 
+Cu.importGlobalProperties(["DOMParser"]);
+
 function run_test() {
   createTestDirectory();
 
   srv = createServer();
   srv.registerDirectory("/", dir);
 
   var nameDir = do_get_file("data/name-scheme/");
   srv.registerDirectory("/bar/", nameDir);
--- a/security/sandbox/test/browser_bug1393259.js
+++ b/security/sandbox/test/browser_bug1393259.js
@@ -121,16 +121,18 @@ add_task(async function() {
 
     // Cleanup previous aborted tests.
     unregisterFont(privateFontPath, /* waitForUnreg = */ false);
 
     await registerFont(privateFontPath);
 
     // Get a list of fonts being used to display the web content.
     let fontList = await ContentTask.spawn(aBrowser, {}, async function() {
+      Cu.importGlobalProperties(["InspectorUtils"]);
+
       let window = content.window.wrappedJSObject;
       let range = window.document.createRange();
       let contentDiv = window.document.getElementById("content");
       range.selectNode(contentDiv);
       let fonts = InspectorUtils.getUsedFontFaces(range);
 
       let fontList = [];
       for (let i = 0; i < fonts.length; i++) {
--- a/taskcluster/docker/periodic-updates/scripts/genHPKPStaticPins.js
+++ b/taskcluster/docker/periodic-updates/scripts/genHPKPStaticPins.js
@@ -16,16 +16,18 @@ if (arguments.length != 2) {
                   "<absolute path to PreloadedHPKPins.json> " +
                   "<absolute path to StaticHPKPins.h>");
 }
 
 var { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm", {});
 var { FileUtils } = ChromeUtils.import("resource://gre/modules/FileUtils.jsm", {});
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {});
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 var gCertDB = Cc["@mozilla.org/security/x509certdb;1"]
                 .getService(Ci.nsIX509CertDB);
 
 const SHA256_PREFIX = "sha256/";
 const GOOGLE_PIN_PREFIX = "GOOGLE_PIN_";
 
 // Pins expire in 14 weeks (6 weeks on Beta + 8 weeks on stable)
 const PINNING_MINIMUM_REQUIRED_MAX_AGE = 60 * 60 * 24 * 7 * 14;
--- a/taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js
+++ b/taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js
@@ -15,16 +15,18 @@ var Cu = Components.utils;
 var Cr = Components.results;
 */
 var gSSService = Cc["@mozilla.org/ssservice;1"].getService(Ci.nsISiteSecurityService);
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 const SOURCE = "https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.json?format=TEXT";
 const TOOL_SOURCE = "https://hg.mozilla.org/mozilla-central/file/tip/taskcluster/docker/periodic-updates/scripts/getHSTSPreloadList.js";
 const OUTPUT = "nsSTSPreloadList.inc";
 const ERROR_OUTPUT = "nsSTSPreloadList.errors";
 const MINIMUM_REQUIRED_MAX_AGE = 60 * 60 * 24 * 7 * 18;
 const MAX_CONCURRENT_REQUESTS = 500;
 const MAX_RETRIES = 1;
 const REQUEST_TIMEOUT = 30 * 1000;
--- a/testing/marionette/test/unit/test_navigate.js
+++ b/testing/marionette/test/unit/test_navigate.js
@@ -1,12 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+Cu.importGlobalProperties(["URL"]);
+
 ChromeUtils.import("chrome://marionette/content/navigate.js");
 
 add_test(function test_isLoadEventExpected() {
   Assert.throws(() => navigate.isLoadEventExpected(undefined),
       /Expected at least one URL/);
 
   equal(true, navigate.isLoadEventExpected("http://a/"));
   equal(true, navigate.isLoadEventExpected("http://a/", "http://a/"));
--- a/testing/mochitest/api.js
+++ b/testing/mochitest/api.js
@@ -12,16 +12,18 @@ ChromeUtils.import("resource://gre/modul
 function loadChromeScripts(win) {
   Services.scriptloader.loadSubScript("chrome://mochikit/content/chrome-harness.js", win);
   Services.scriptloader.loadSubScript("chrome://mochikit/content/mochitest-e10s-utils.js", win);
   Services.scriptloader.loadSubScript("chrome://mochikit/content/browser-test.js", win);
 }
 
 // ///// Android ///////
 
+Cu.importGlobalProperties(["TextDecoder"]);
+
 const windowTracker = {
   init() {
     Services.obs.addObserver(this, "chrome-document-global-created");
   },
 
   async observe(window, topic, data) {
     if (topic === "chrome-document-global-created") {
       await new Promise(resolve =>
--- a/testing/modules/TestUtils.jsm
+++ b/testing/modules/TestUtils.jsm
@@ -20,16 +20,18 @@
 
 var EXPORTED_SYMBOLS = [
   "TestUtils",
 ];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
 
+Cu.importGlobalProperties(["Element"]);
+
 var TestUtils = {
   executeSoon(callbackFn) {
     Services.tm.dispatchToMainThread(callbackFn);
   },
 
   waitForTick() {
     return new Promise(resolve => this.executeSoon(resolve));
   },
--- a/testing/specialpowers/content/SpecialPowersObserver.jsm
+++ b/testing/specialpowers/content/SpecialPowersObserver.jsm
@@ -9,16 +9,17 @@
 // https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_1.9.3
 // https://developer.mozilla.org/en/how_to_build_an_xpcom_component_in_javascript
 
 /* import-globals-from SpecialPowersObserverAPI.js */
 
 var EXPORTED_SYMBOLS = ["SpecialPowersObserver"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
+Cu.importGlobalProperties(["File"]);
 
 const CHILD_SCRIPT_API = "resource://specialpowers/specialpowersFrameScript.js";
 const CHILD_LOGGER_SCRIPT = "resource://specialpowers/MozillaLogger.js";
 
 
 // Glue to add in the observer API to this object.  This allows us to share code with chrome tests
 Services.scriptloader.loadSubScript("resource://specialpowers/SpecialPowersObserverAPI.js");
 
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -32,16 +32,24 @@ ChromeUtils.defineModuleGetter(this, "Ne
 ChromeUtils.defineModuleGetter(this, "AppConstants",
                                "resource://gre/modules/AppConstants.jsm");
 ChromeUtils.defineModuleGetter(this, "ServiceWorkerCleanUp",
                                "resource://gre/modules/ServiceWorkerCleanUp.jsm");
 
 ChromeUtils.defineModuleGetter(this, "PerTestCoverageUtils",
   "resource://testing-common/PerTestCoverageUtils.jsm");
 
+try {
+    Cu.importGlobalProperties(["DOMParser", "File", "InspectorUtils",
+                               "NodeFilter", "PromiseDebugging"]);
+} catch (e) {
+  // We are in window scope hence DOMParser, File, InspectorUtils, NodeFilter,
+  // and PromiseDebugging are already defined, So do nothing.
+}
+
 // Allow stuff from this scope to be accessed from non-privileged scopes. This
 // would crash if used outside of automation.
 Cu.forcePermissiveCOWs();
 
 function SpecialPowersAPI() {
   this._consoleListeners = [];
   this._encounteredCrashDumpFiles = [];
   this._unexpectedCrashDumpFiles = { };
@@ -504,16 +512,17 @@ SpecialPowersAPI.prototype = {
   loadPrivilegedScript(aFunction) {
     var str = "(" + aFunction.toString() + ")();";
     let gGlobalObject = Cu.getGlobalForObject(this);
     let sb = Cu.Sandbox(gGlobalObject);
     var window = this.window.get();
     var mc = new window.MessageChannel();
     sb.port = mc.port1;
     try {
+      Cu.importGlobalProperties(["URL", "Blob"]);
       let blob = new Blob([str], {type: "application/javascript"});
       let blobUrl = URL.createObjectURL(blob);
       Services.scriptloader.loadSubScript(blobUrl, sb);
     } catch (e) {
       throw wrapIfUnwrapped(e);
     }
 
     return mc.port2;
--- a/testing/talos/talos/startup_test/sessionrestore/addon/api.js
+++ b/testing/talos/talos/startup_test/sessionrestore/addon/api.js
@@ -53,16 +53,17 @@ this.sessionrestore = class extends Exte
     if (args && args instanceof Ci.nsIArray) {
       // For start-up tests Gecko Profiler arguments are passed to the first URL in
       // the query string, with the presumption that some tab that is loaded at start-up
       // will want to use them in the TalosContentProfiler.js script.
       //
       // Because we're running this part of the test in the parent process, we
       // pull those arguments from the top window directly. This is mainly so
       // that TalosParentProfiler knows where to save the profile.
+      Cu.importGlobalProperties(["URL"]);
       let url = new URL(args.queryElementAt(0, Ci.nsISupportsString).data);
       this.TalosParentProfiler.initFromURLQueryParams(url.search);
     }
 
     await this.TalosParentProfiler.pause(msg);
     await this.TalosParentProfiler.finishStartupProfiling();
   }
 
--- a/testing/talos/talos/talos-powers/api.js
+++ b/testing/talos/talos/talos-powers/api.js
@@ -11,16 +11,18 @@ XPCOMUtils.defineLazyModuleGetters(this,
   Services: "resource://gre/modules/Services.jsm",
   PerTestCoverageUtils: "resource://testing-common/PerTestCoverageUtils.jsm",
 });
 
 XPCOMUtils.defineLazyServiceGetter(this, "resProto",
                                    "@mozilla.org/network/protocol;1?name=resource",
                                    "nsISubstitutingProtocolHandler");
 
+Cu.importGlobalProperties(["TextEncoder"]);
+
 const Cm = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
 let frameScriptURL;
 
 function TalosPowersService() {
   this.wrappedJSObject = this;
 
   this.init();
--- a/testing/talos/talos/tests/devtools/addon/content/tests/.eslintrc.js
+++ b/testing/talos/talos/tests/devtools/addon/content/tests/.eslintrc.js
@@ -16,17 +16,17 @@ module.exports = {
     "no-unused-vars": ["error", {"args": "none", "vars": "all"}],
     // These are the rules that have been configured so far to match the
     // devtools coding style.
 
     // Rules from the mozilla plugin
     "mozilla/no-aArgs": "error",
     "mozilla/no-single-arg-cu-import": "error",
     // See bug 1224289.
-    "mozilla/reject-importGlobalProperties": ["error", "everything"],
+    "mozilla/reject-importGlobalProperties": "error",
     // devtools/shared/platform is special; see the README.md in that
     // directory for details.  We reject requires using explicit
     // subdirectories of this directory.
     "mozilla/reject-some-requires": ["error", "^devtools/shared/platform/(chome|content)/"],
     "mozilla/var-only-at-top-level": "error",
     "mozilla/use-chromeutils-import": ["error", {allowCu: true}]
   }
 };
--- a/testing/xpcshell/head.js
+++ b/testing/xpcshell/head.js
@@ -41,16 +41,18 @@ var _Services = ChromeUtils.import("reso
 
 var _PromiseTestUtils = ChromeUtils.import("resource://testing-common/PromiseTestUtils.jsm", null).PromiseTestUtils;
 var _Task = ChromeUtils.import("resource://gre/modules/Task.jsm", null).Task;
 
 let _NetUtil = ChromeUtils.import("resource://gre/modules/NetUtil.jsm", null).NetUtil;
 
 let _XPCOMUtils = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", null).XPCOMUtils;
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 // Support a common assertion library, Assert.jsm.
 var AssertCls = ChromeUtils.import("resource://testing-common/Assert.jsm", null).Assert;
 // Pass a custom report function for xpcshell-test style reporting.
 var Assert = new AssertCls(function(err, message, stack) {
   if (err) {
     do_report_result(false, err.message, err.stack);
   } else {
     do_report_result(true, message, stack);
--- a/toolkit/components/extensions/child/ext-userScripts.js
+++ b/toolkit/components/extensions/child/ext-userScripts.js
@@ -2,17 +2,16 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 "use strict";
 
 var USERSCRIPT_PREFNAME = "extensions.webextensions.userScripts.enabled";
 var USERSCRIPT_DISABLED_ERRORMSG = `userScripts APIs are currently experimental and must be enabled with the ${USERSCRIPT_PREFNAME} preference.`;
 
 XPCOMUtils.defineLazyPreferenceGetter(this, "userScriptsEnabled", USERSCRIPT_PREFNAME, false);
 
-// eslint-disable-next-line mozilla/reject-importGlobalProperties
 Cu.importGlobalProperties(["crypto", "TextEncoder"]);
 
 var {
   DefaultMap,
   ExtensionError,
   getUniqueId,
 } = ExtensionUtils;
 
--- a/toolkit/components/extensions/test/mochitest/webrequest_test.jsm
+++ b/toolkit/components/extensions/test/mochitest/webrequest_test.jsm
@@ -1,13 +1,13 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = ["webrequest_test"];
 
-Cu.importGlobalProperties(["fetch"]);
+Cu.importGlobalProperties(["fetch", "XMLHttpRequest"]);
 
 var webrequest_test = {
   testFetch(url) {
     return fetch(url);
   },
 
   testXHR(url) {
     return new Promise(resolve => {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_triggeringPrincipal.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_triggeringPrincipal.js
@@ -8,16 +8,18 @@
  * and that the correct security policies are applied to the resulting
  * loads.
  */
 
 const {escaped} = ChromeUtils.import("resource://testing-common/AddonTestUtils.jsm", {});
 
 const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
 
+Cu.importGlobalProperties(["URL"]);
+
 // Make sure media pre-loading is enabled on Android so that our <audio> and
 // <video> elements trigger the expected requests.
 Services.prefs.setIntPref("media.autoplay.default", Ci.nsIAutoplay.ALLOWED);
 Services.prefs.setIntPref("media.preload.default", 3);
 
 // Increase the length of the code samples included in CSP reports so that we
 // can correctly validate them.
 Services.prefs.setIntPref("security.csp.reporting.script-sample.max-length", 4096);
--- a/toolkit/components/extensions/test/xpcshell/test_ext_i18n_css.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_i18n_css.js
@@ -3,16 +3,18 @@
 ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 
 const server = createHttpServer();
 server.registerDirectory("/data/", do_get_file("data"));
 
 const BASE_URL = `http://localhost:${server.identity.primaryPort}/data`;
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 const {
   createAppInfo,
   promiseShutdownManager,
   promiseStartupManager,
 } = AddonTestUtils;
 
 AddonTestUtils.init(this);
 
--- a/toolkit/components/extensions/test/xpcshell/test_ext_persistent_events.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_persistent_events.js
@@ -1,12 +1,14 @@
 "use strict";
 
 PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
 
+Cu.importGlobalProperties(["Blob", "URL"]);
+
 ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
 const {ExtensionAPI} = ExtensionCommon;
 
 const SCHEMA = [
   {
     namespace: "eventtest",
     events: [
       {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_proxy_auth.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_proxy_auth.js
@@ -1,10 +1,12 @@
 "use strict";
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 const proxy = createHttpServer();
 
 // accept proxy connections for mozilla.org
 proxy.identity.add("http", "mozilla.org", 80);
 
 proxy.registerPathHandler("/", (request, response) => {
   if (request.hasHeader("Proxy-Authorization")) {
     response.setStatusLine(request.httpVersion, 200, "OK");
--- a/toolkit/components/extensions/test/xpcshell/test_ext_proxy_onauthrequired.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_proxy_onauthrequired.js
@@ -1,10 +1,12 @@
 "use strict";
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 const proxy = createHttpServer();
 
 // accept proxy connections for mozilla.org
 proxy.identity.add("http", "mozilla.org", 80);
 
 proxy.registerPathHandler("/", (request, response) => {
   if (request.hasHeader("Proxy-Authorization")) {
     response.setStatusLine(request.httpVersion, 200, "OK");
--- a/toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_redirects.js
@@ -1,13 +1,14 @@
 "use strict";
 
 // Tests whether we can redirect to a moz-extension: url.
 ChromeUtils.defineModuleGetter(this, "TestUtils",
                                "resource://testing-common/TestUtils.jsm");
+Cu.importGlobalProperties(["XMLHttpRequest"]);
 
 PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
 
 const server = createHttpServer();
 const gServerUrl = `http://localhost:${server.identity.primaryPort}`;
 
 server.registerPathHandler("/redirect", (request, response) => {
   let params = new URLSearchParams(request.queryString);
--- a/toolkit/components/extensions/test/xpcshell/test_ext_schemas_manifest_permissions.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_schemas_manifest_permissions.js
@@ -1,13 +1,15 @@
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
 const {ExtensionAPI} = ExtensionCommon;
 
+Cu.importGlobalProperties(["Blob", "URL"]);
+
 add_task(async function() {
   const schema = [
     {
       namespace: "manifest",
       types: [
         {
           "$extend": "WebExtensionManifest",
           properties: {
--- a/toolkit/components/extensions/test/xpcshell/test_ext_schemas_privileged.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_schemas_privileged.js
@@ -1,13 +1,15 @@
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
 const {ExtensionAPI} = ExtensionCommon;
 
+Cu.importGlobalProperties(["Blob", "URL"]);
+
 AddonTestUtils.init(this);
 AddonTestUtils.overrideCertDB();
 
 add_task(async function() {
   const schema = [
     {
       namespace: "privileged",
       permissions: ["mozillaAddons"],
--- a/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_auth.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_webRequest_auth.js
@@ -1,10 +1,12 @@
 "use strict";
 
+Cu.importGlobalProperties(["URL"]);
+
 const HOSTS = new Set([
   "example.com",
 ]);
 
 const server = createHttpServer({hosts: HOSTS});
 
 const BASE_URL = "http://example.com";
 
--- a/toolkit/components/narrate/.eslintrc.js
+++ b/toolkit/components/narrate/.eslintrc.js
@@ -1,14 +1,14 @@
 "use strict";
 
 module.exports = {
   "rules": {
     "mozilla/no-aArgs": "error",
-    "mozilla/reject-importGlobalProperties": ["error", "everything"],
+    "mozilla/reject-importGlobalProperties": "error",
     "mozilla/var-only-at-top-level": "error",
     "block-scoped-var": "error",
     "camelcase": "error",
     "complexity": ["error", {"max": 20}],
     "curly": "error",
     "dot-location": ["error", "property"],
     "indent-legacy": ["error", 2, {"SwitchCase": 1}],
     "max-len": ["error", 80, 2, {"ignoreUrls": true}],
--- a/toolkit/components/osfile/modules/ospath_unix.jsm
+++ b/toolkit/components/osfile/modules/ospath_unix.jsm
@@ -15,16 +15,17 @@
  * - all path concatenations go through function |join|.
  */
 
 "use strict";
 
 // Boilerplate used to be able to import this module both from the main
 // thread and from worker threads.
 if (typeof Components != "undefined") {
+  Cu.importGlobalProperties(["URL"]);
   // Global definition of |exports|, to keep everybody happy.
   // In non-main thread, |exports| is provided by the module
   // loader.
   this.exports = {};
 } else if (typeof module == "undefined" || typeof exports == "undefined") {
   throw new Error("Please load this module using require()");
 }
 
--- a/toolkit/components/osfile/modules/ospath_win.jsm
+++ b/toolkit/components/osfile/modules/ospath_win.jsm
@@ -24,16 +24,17 @@
  * components.
  */
 
 "use strict";
 
 // Boilerplate used to be able to import this module both from the main
 // thread and from worker threads.
 if (typeof Components != "undefined") {
+  Cu.importGlobalProperties(["URL"]);
   // Global definition of |exports|, to keep everybody happy.
   // In non-main thread, |exports| is provided by the module
   // loader.
   this.exports = {};
 } else if (typeof module == "undefined" || typeof exports == "undefined") {
   throw new Error("Please load this module using require()");
 }
 
--- a/toolkit/components/passwordmgr/test/unit/test_recipes_content.js
+++ b/toolkit/components/passwordmgr/test/unit/test_recipes_content.js
@@ -2,16 +2,18 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Test filtering recipes in LoginRecipesContent.
  */
 
 "use strict";
 
+Cu.importGlobalProperties(["URL"]);
+
 add_task(async function test_getFieldOverrides() {
   let recipes = new Set([
     { // path doesn't match but otherwise good
       hosts: ["example.com:8080"],
       passwordSelector: "#password",
       pathRegex: /^\/$/,
       usernameSelector: ".username",
     },
--- a/toolkit/components/places/tests/PlacesTestUtils.jsm
+++ b/toolkit/components/places/tests/PlacesTestUtils.jsm
@@ -1,14 +1,16 @@
 "use strict";
 
 var EXPORTED_SYMBOLS = [
   "PlacesTestUtils",
 ];
 
+Cu.importGlobalProperties(["URL"]);
+
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.defineModuleGetter(this, "PlacesUtils",
                                "resource://gre/modules/PlacesUtils.jsm");
 ChromeUtils.defineModuleGetter(this, "TestUtils",
                                "resource://testing-common/TestUtils.jsm");
 
 var PlacesTestUtils = Object.freeze({
   /**
--- a/toolkit/components/places/tests/head_common.js
+++ b/toolkit/components/places/tests/head_common.js
@@ -13,16 +13,18 @@ const TRANSITION_EMBED = Ci.nsINavHistor
 const TRANSITION_FRAMED_LINK = Ci.nsINavHistoryService.TRANSITION_FRAMED_LINK;
 const TRANSITION_REDIRECT_PERMANENT = Ci.nsINavHistoryService.TRANSITION_REDIRECT_PERMANENT;
 const TRANSITION_REDIRECT_TEMPORARY = Ci.nsINavHistoryService.TRANSITION_REDIRECT_TEMPORARY;
 const TRANSITION_DOWNLOAD = Ci.nsINavHistoryService.TRANSITION_DOWNLOAD;
 const TRANSITION_RELOAD = Ci.nsINavHistoryService.TRANSITION_RELOAD;
 
 const TITLE_LENGTH_MAX = 4096;
 
+Cu.importGlobalProperties(["URL"]);
+
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetters(this, {
   FileUtils: "resource://gre/modules/FileUtils.jsm",
   NetUtil: "resource://gre/modules/NetUtil.jsm",
   PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
   Services: "resource://gre/modules/Services.jsm",
   BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.jsm",
   BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.jsm",
--- a/toolkit/components/places/tests/history/test_remove.js
+++ b/toolkit/components/places/tests/history/test_remove.js
@@ -1,15 +1,18 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et: */
 
 // Tests for `History.remove`, as implemented in History.jsm
 
 "use strict";
 
+Cu.importGlobalProperties(["URL"]);
+
+
 // Test removing a single page
 add_task(async function test_remove_single() {
   await PlacesUtils.history.clear();
   await PlacesUtils.bookmarks.eraseEverything();
 
 
   let WITNESS_URI = NetUtil.newURI("http://mozilla.com/test_browserhistory/test_remove/" + Math.random());
   await PlacesTestUtils.addVisits(WITNESS_URI);
--- a/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
+++ b/toolkit/components/places/tests/history/test_removeVisitsByFilter.js
@@ -1,15 +1,17 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et: */
 
 // Tests for `History.removeVisitsByFilter`, as implemented in History.jsm
 
 "use strict";
 
+Cu.importGlobalProperties(["URL"]);
+
 ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm", this);
 
 add_task(async function test_removeVisitsByFilter() {
   let referenceDate = new Date(1999, 9, 9, 9, 9);
 
   // Populate a database with 20 entries, remove a subset of entries,
   // ensure consistency.
   let remover = async function(options) {
--- a/toolkit/components/places/tests/migration/test_current_from_v34.js
+++ b/toolkit/components/places/tests/migration/test_current_from_v34.js
@@ -1,9 +1,9 @@
-Cu.importGlobalProperties(["crypto"]);
+Cu.importGlobalProperties(["URL", "crypto"]);
 
 const { TYPE_BOOKMARK, TYPE_FOLDER } = Ci.nsINavBookmarksService;
 const { EXPIRE_NEVER, TYPE_INT32 } = Ci.nsIAnnotationService;
 
 function makeGuid() {
   return ChromeUtils.base64URLEncode(crypto.getRandomValues(new Uint8Array(9)), {
     pad: false,
   });
--- a/toolkit/components/places/tests/sync/test_sync_utils.js
+++ b/toolkit/components/places/tests/sync/test_sync_utils.js
@@ -1,13 +1,14 @@
 ChromeUtils.import("resource://gre/modules/ObjectUtils.jsm");
 ChromeUtils.import("resource://gre/modules/PlacesSyncUtils.jsm");
 ChromeUtils.import("resource://testing-common/httpd.js");
 ChromeUtils.defineModuleGetter(this, "Preferences",
                                "resource://gre/modules/Preferences.jsm");
+Cu.importGlobalProperties(["URLSearchParams"]);
 
 const SYNC_PARENT_ANNO = "sync/parent";
 
 var makeGuid = PlacesUtils.history.makeGuid;
 
 function shuffle(array) {
   let results = [];
   for (let i = 0; i < array.length; ++i) {
--- a/toolkit/components/places/tests/unit/test_async_transactions.js
+++ b/toolkit/components/places/tests/unit/test_async_transactions.js
@@ -6,16 +6,17 @@
 
 const bmsvc    = PlacesUtils.bookmarks;
 const obsvc    = PlacesUtils.observers;
 const tagssvc  = PlacesUtils.tagging;
 const annosvc  = PlacesUtils.annotations;
 const PT       = PlacesTransactions;
 const menuGuid = PlacesUtils.bookmarks.menuGuid;
 
+Cu.importGlobalProperties(["URL"]);
 ChromeUtils.defineModuleGetter(this, "Preferences",
                                "resource://gre/modules/Preferences.jsm");
 
 
 // Create and add bookmarks observer.
 var observer = {
   __proto__: NavBookmarkObserver.prototype,
 
--- a/toolkit/components/places/tests/unit/test_bookmarks_html_escape_entities.js
+++ b/toolkit/components/places/tests/unit/test_bookmarks_html_escape_entities.js
@@ -2,16 +2,18 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Checks that html entities are escaped in bookmarks.html files.
 
 const DESCRIPTION_ANNO = "bookmarkProperties/description";
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 add_task(async function() {
   // Removes bookmarks.html if the file already exists.
   let HTMLFile = OS.Path.join(OS.Constants.Path.profileDir, "bookmarks.html");
   if ((await OS.File.exists(HTMLFile))) {
     await OS.File.remove(HTMLFile);
   }
 
   let unescaped = '<unescaped="test">';
--- a/toolkit/modules/Console.jsm
+++ b/toolkit/modules/Console.jsm
@@ -19,16 +19,17 @@
  * - The primary use of this API is debugging and error logging so the perfect
  *   implementation isn't always required (or even well defined)
  */
 
 var EXPORTED_SYMBOLS = [ "console", "ConsoleAPI" ];
 
 ChromeUtils.defineModuleGetter(this, "Services",
                                "resource://gre/modules/Services.jsm");
+Cu.importGlobalProperties(["Element"]);
 
 var gTimerRegistry = new Map();
 
 /**
  * String utility to ensure that strings are a specified length. Strings
  * that are too long are truncated to the max length and the last char is
  * set to "_". Strings that are too short are padded with spaces.
  *
--- a/toolkit/modules/Http.jsm
+++ b/toolkit/modules/Http.jsm
@@ -1,14 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const EXPORTED_SYMBOLS = ["httpRequest", "percentEncode"];
 
+Cu.importGlobalProperties(["XMLHttpRequest"]);
+
 // Strictly follow RFC 3986 when encoding URI components.
 // Accepts a unescaped string and returns the URI encoded string for use in
 // an HTTP request.
 function percentEncode(aString) {
   return encodeURIComponent(aString).replace(/[!'()]/g, escape).replace(/\*/g, "%2A");
 }
 
 /*
--- a/toolkit/modules/NewTabUtils.jsm
+++ b/toolkit/modules/NewTabUtils.jsm
@@ -3,16 +3,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["NewTabUtils"];
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+Cu.importGlobalProperties(["btoa", "URL"]);
 
 // Android tests don't import these properly, so guard against that
 let shortURL = {};
 let searchShortcuts = {};
 let didSuccessfulImport = false;
 try {
   ChromeUtils.import("resource://activity-stream/lib/ShortURL.jsm", shortURL);
   ChromeUtils.import("resource://activity-stream/lib/SearchShortcuts.jsm", searchShortcuts);
--- a/toolkit/modules/subprocess/Subprocess.jsm
+++ b/toolkit/modules/subprocess/Subprocess.jsm
@@ -11,16 +11,18 @@
  */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["Subprocess"];
 
 /* exported Subprocess */
 
+Cu.importGlobalProperties(["TextEncoder"]);
+
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 ChromeUtils.import("resource://gre/modules/subprocess/subprocess_common.jsm");
 
 if (AppConstants.platform == "win") {
   ChromeUtils.defineModuleGetter(this, "SubprocessImpl",
                                  "resource://gre/modules/subprocess/subprocess_win.jsm");
 } else {
   ChromeUtils.defineModuleGetter(this, "SubprocessImpl",
--- a/toolkit/modules/subprocess/subprocess_common.jsm
+++ b/toolkit/modules/subprocess/subprocess_common.jsm
@@ -3,16 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 /* eslint-disable mozilla/balanced-listeners */
 
 ChromeUtils.import("resource://gre/modules/Services.jsm");
+Cu.importGlobalProperties(["TextDecoder"]);
 
 ChromeUtils.defineModuleGetter(this, "AsyncShutdown",
                                "resource://gre/modules/AsyncShutdown.jsm");
 ChromeUtils.defineModuleGetter(this, "setTimeout",
                                "resource://gre/modules/Timer.jsm");
 
 Services.scriptloader.loadSubScript("resource://gre/modules/subprocess/subprocess_shared.js", this);
 
--- a/toolkit/modules/subprocess/subprocess_unix.jsm
+++ b/toolkit/modules/subprocess/subprocess_unix.jsm
@@ -2,16 +2,18 @@
 /* vim: set sts=2 sw=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 /* eslint-disable mozilla/balanced-listeners */
 
+Cu.importGlobalProperties(["TextDecoder"]);
+
 var EXPORTED_SYMBOLS = ["SubprocessImpl"];
 
 ChromeUtils.import("resource://gre/modules/ctypes.jsm");
 ChromeUtils.import("resource://gre/modules/osfile.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/subprocess/subprocess_common.jsm");
 
 /* import-globals-from subprocess_shared.js */
--- a/toolkit/modules/tests/modules/MockDocument.jsm
+++ b/toolkit/modules/tests/modules/MockDocument.jsm
@@ -1,16 +1,18 @@
 /**
  * Provides infrastructure for tests that would require mock document.
  */
 
 "use strict";
 
 var EXPORTED_SYMBOLS = ["MockDocument"];
 
+Cu.importGlobalProperties(["DOMParser", "URL"]);
+
 const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm", {});
 
 const MockDocument = {
   /**
    * Create a document for the given URL containing the given HTML with the ownerDocument of all <form>s having a mocked location.
    */
   createTestDocument(aDocumentURL, aContent = "<form>", aType = "text/html") {
     let parser = new DOMParser();
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
@@ -10,16 +10,17 @@ var GMPInstallManager = GMPScope.GMPInst
 
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 ChromeUtils.import("resource://testing-common/httpd.js");
 ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 ChromeUtils.import("resource://gre/modules/UpdateUtils.jsm");
+Cu.importGlobalProperties(["DOMParser"]);
 
 var ProductAddonCheckerScope = ChromeUtils.import("resource://gre/modules/addons/ProductAddonChecker.jsm", {});
 
 Services.prefs.setBoolPref("security.allow_eval_with_system_principal", true);
 Services.prefs.setBoolPref("media.gmp-manager.updateEnabled", true);
 registerCleanupFunction(() => {
   Services.prefs.clearUserPref("security.allow_eval_with_system_principal");
   Services.prefs.clearUserPref("media.gmp-manager.updateEnabled");
--- a/toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
+++ b/toolkit/mozapps/extensions/internal/AddonTestUtils.jsm
@@ -6,17 +6,17 @@
 /* eslint "no-unused-vars": [2, {"args": "none", "varsIgnorePattern": "^(Cc|Ci|Cr|Cu|EXPORTED_SYMBOLS)$"}] */
 /* eslint "semi": [2, "always"] */
 /* eslint "valid-jsdoc": [2, {requireReturn: false}] */
 
 var EXPORTED_SYMBOLS = ["AddonTestUtils", "MockAsyncShutdown"];
 
 const CERTDB_CONTRACTID = "@mozilla.org/security/x509certdb;1";
 
-Cu.importGlobalProperties(["fetch"]);
+Cu.importGlobalProperties(["fetch", "TextEncoder"]);
 
 ChromeUtils.import("resource://gre/modules/AsyncShutdown.jsm");
 ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Timer.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -4,16 +4,18 @@
 
 /* eslint no-unused-vars: ["error", {vars: "local", args: "none"}] */
 
 if (!_TEST_FILE[0].includes("toolkit/mozapps/extensions/test/xpcshell/")) {
   ok(false, ("head_addons.js may not be loaded by tests outside of " +
              "the add-on manager component."));
 }
 
+Cu.importGlobalProperties(["TextEncoder"]);
+
 const PREF_EM_CHECK_UPDATE_SECURITY   = "extensions.checkUpdateSecurity";
 const PREF_EM_STRICT_COMPATIBILITY    = "extensions.strictCompatibility";
 const PREF_GETADDONS_BYIDS               = "extensions.getAddons.get.url";
 const PREF_COMPAT_OVERRIDES              = "extensions.getAddons.compatOverides.url";
 const PREF_XPI_SIGNATURES_REQUIRED    = "xpinstall.signatures.required";
 
 const PREF_DISABLE_SECURITY = ("security.turn_off_all_security_so_that_" +
                                "viruses_can_take_over_this_computer");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_url_parameters.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_url_parameters.js
@@ -4,16 +4,18 @@
  */
 
 const PREF_BLOCKLIST_URL              = "extensions.blocklist.url";
 const PREF_BLOCKLIST_ENABLED          = "extensions.blocklist.enabled";
 const PREF_APP_DISTRIBUTION           = "distribution.id";
 const PREF_APP_DISTRIBUTION_VERSION   = "distribution.version";
 const PREF_APP_UPDATE_CHANNEL         = "app.update.channel";
 
+Cu.importGlobalProperties(["URLSearchParams"]);
+
 // Get the HTTP server.
 var testserver = AddonTestUtils.createHttpServer({hosts: ["example.com"]});
 
 async function updateBlocklist(file) {
   let blocklistUpdated = TestUtils.topicObserved("blocklist-updated");
   Blocklist.notify();
   return blocklistUpdated;
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_update.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_update.js
@@ -8,16 +8,18 @@
 Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
 
 // This test requires lightweight themes update to be enabled even if the app
 // doesn't support lightweight themes.
 Services.prefs.setBoolPref("lightweightThemes.update.enabled", true);
 
 ChromeUtils.import("resource://gre/modules/LightweightThemeManager.jsm");
 
+Cu.importGlobalProperties(["URLSearchParams"]);
+
 var gInstallDate;
 
 const updateFile = "test_update.json";
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 const ADDONS = {
@@ -948,8 +950,9 @@ add_task(async function run_test_locked_
 
   let result = await AddonTestUtils.promiseFindAddonUpdates(a13);
   ok(!result.compatibilityUpdate, "Should not have seen a compatibility update");
   ok(!result.updateAvailable, "Should not have seen a version update");
 
   let installs = await AddonManager.getAllInstalls();
   equal(installs.length, 0);
 });
+
--- a/toolkit/mozapps/extensions/test/xpcshell/test_update_compatmode.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_update_compatmode.js
@@ -1,15 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 // This verifies that add-on update check correctly fills in the
 // %COMPATIBILITY_MODE% token in the update URL.
 
+Cu.importGlobalProperties(["URLSearchParams"]);
+
 // The test extension uses an insecure update url.
 Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
 
 let testserver = createHttpServer({hosts: ["example.com"]});
 
 let lastMode;
 testserver.registerPathHandler("/update.json", (request, response) => {
   let params = new URLSearchParams(request.queryString);
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js
@@ -170,17 +170,16 @@ module.exports = {
     "mozilla/avoid-removeChild": "error",
     "mozilla/import-browser-window-globals": "error",
     "mozilla/import-globals": "error",
     "mozilla/no-compare-against-boolean-literals": "error",
     "mozilla/no-define-cc-etc": "error",
     "mozilla/no-import-into-var-and-global": "error",
     "mozilla/no-useless-parameters": "error",
     "mozilla/no-useless-removeEventListener": "error",
-    "mozilla/reject-importGlobalProperties": ["error", "allownonwebidl"],
     "mozilla/rejects-requires-await": "error",
     "mozilla/use-cc-etc": "error",
     "mozilla/use-chromeutils-generateqi": "error",
     "mozilla/use-chromeutils-import": "error",
     "mozilla/use-default-preference-values": "error",
     "mozilla/use-includes-instead-of-indexOf": "error",
     "mozilla/use-ownerGlobal": "error",
     "mozilla/use-services": "error",
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/rules/reject-importGlobalProperties.js
@@ -3,53 +3,33 @@
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
 "use strict";
 
-const privilegedGlobals = Object.keys(require("../environments/privileged.js").globals);
-
 // -----------------------------------------------------------------------------
 // Rule Definition
 // -----------------------------------------------------------------------------
 
-module.exports = {
-  meta: {
-    messages: {
-      unexpectedCall: "Unexpected call to Cu.importGlobalProperties",
-      unexpectedCallWebIdl: "Unnecessary call to Cu.importGlobalProperties (webidl names are automatically imported)",
-    },
-    schema: [{
-      // XXX Better name?
-      "enum": ["everything", "allownonwebidl"],
-    }],
-    type: "problem",
-  },
+module.exports = function(context) {
 
-  create(context) {
-    return {
-      "CallExpression": function(node) {
-        if (node.callee.type !== "MemberExpression") {
-          return;
-        }
+  // ---------------------------------------------------------------------------
+  // Public
+  //  --------------------------------------------------------------------------
+
+  return {
+    "CallExpression": function(node) {
+      if (node.callee.type === "MemberExpression") {
         let memexp = node.callee;
         if (memexp.object.type === "Identifier" &&
             // Only Cu, not Components.utils; see bug 1230369.
             memexp.object.name === "Cu" &&
             memexp.property.type === "Identifier" &&
             memexp.property.name === "importGlobalProperties") {
-          if (context.options.includes("allownonwebidl")) {
-            for (let element of node.arguments[0].elements) {
-              if (privilegedGlobals.includes(element.value)) {
-                context.report({ node, messageId: "unexpectedCallWebIdl"});
-              }
-            }
-          } else {
-            context.report({node, messageId: "unexpectedCall"});
-          }
+          context.report(node, "Unexpected call to Cu.importGlobalProperties");
         }
-      },
-    };
-  },
+      }
+    },
+  };
 };
--- a/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package-lock.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "1.0.3",
+  "version": "1.0.2",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
     "acorn": {
       "version": "5.7.1",
       "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz",
       "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==",
       "dev": true
--- a/tools/lint/eslint/eslint-plugin-mozilla/package.json
+++ b/tools/lint/eslint/eslint-plugin-mozilla/package.json
@@ -1,11 +1,11 @@
 {
   "name": "eslint-plugin-mozilla",
-  "version": "1.0.3",
+  "version": "1.0.2",
   "description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
   "keywords": [
     "eslint",
     "eslintplugin",
     "eslint-plugin",
     "mozilla",
     "firefox"
   ],
deleted file mode 100644
--- a/tools/lint/eslint/eslint-plugin-mozilla/tests/reject-importGlobalProperties.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-// ------------------------------------------------------------------------------
-// Requirements
-// ------------------------------------------------------------------------------
-
-var rule = require("../lib/rules/reject-importGlobalProperties");
-var RuleTester = require("eslint/lib/testers/rule-tester");
-
-const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 8 } });
-
-// ------------------------------------------------------------------------------
-// Tests
-// ------------------------------------------------------------------------------
-
-ruleTester.run("reject-importGlobalProperties", rule, {
-  valid: [{
-    code: "Cu.something();",
-  }, {
-    options: ["allownonwebidl"],
-    code: "Cu.importGlobalProperties(['fetch'])",
-  }],
-  invalid: [{
-    code: "Cu.importGlobalProperties(['fetch'])",
-    options: ["everything"],
-    errors: [{ messageId: "unexpectedCall"}],
-  }, {
-    code: "Cu.importGlobalProperties(['TextEncoder'])",
-    options: ["everything"],
-    errors: [{ messageId: "unexpectedCall"}],
-  }, {
-    code: "Cu.importGlobalProperties(['TextEncoder'])",
-    options: ["allownonwebidl"],
-    errors: [{ messageId: "unexpectedCallWebIdl"}],
-  }],
-});