Commit 4c2eeb74 authored by Mark Banner's avatar Mark Banner
Browse files

Bug 1755297 - Match ESLint's definition of structuredClone to where it is actually defined. r=Gijs

parent 59445bae
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -41,10 +41,6 @@ module.exports = {
    openDialog: false,
    // https://developer.mozilla.org/docs/Web/API/Window/sizeToContent
    sizeToContent: false,
    // structuredClone is a new global that only Firefox has currently and so isn't
    // in ESLint's globals yet.
    // https://developer.mozilla.org/docs/Web/API/structuredClone
    structuredClone: false,
    // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/uneval
    uneval: false,
  },
+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,11 @@ const extraDefinitions = [
  { name: "XPCOMUtils", writable: false },
  { name: "Task", writable: false },
  { name: "windowGlobalChild", writable: false },
  // structuredClone is a new global that would be defined for the `browser`
  // environment in ESLint, but only Firefox has implemented it currently and so
  // it isn't in ESLint's globals yet.
  // https://developer.mozilla.org/docs/Web/API/structuredClone
  { name: "structuredClone", writable: false },
];

// Some files in global-scripts.inc need mapping to specific locations.
+0 −4
Original line number Diff line number Diff line
@@ -273,8 +273,6 @@ add_task(async function test_download_preferred_action() {
  for (const file of FILE_TYPES_TO_TEST) {
    // The CD header specifies the download file extension on download
    let fileNoHeader = file;
    // Disabling eslint for structuredClone use, see Bug 1745030
    // eslint-disable-next-line no-undef
    let fileWithHeader = structuredClone(file);
    fileWithHeader.url += "&withHeader";
    for (const action of PREFERRED_ACTIONS) {
@@ -282,7 +280,6 @@ add_task(async function test_download_preferred_action() {
      await createDownloadTest(
        downloadList,
        localHandlerApp,
        // eslint-disable-next-line no-undef
        structuredClone(fileWithHeader),
        action,
        true
@@ -290,7 +287,6 @@ add_task(async function test_download_preferred_action() {
      await createDownloadTest(
        downloadList,
        localHandlerApp,
        // eslint-disable-next-line no-undef
        structuredClone(fileNoHeader),
        action,
        false