Closed Bug 1755297 Opened 4 years ago Closed 4 years ago

ESLint incorrectly assumes `structuredClone` is available everywhere

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P2)

Tracking

(firefox-esr91 unaffected, firefox97 wontfix, firefox98 wontfix, firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

ESLint incorrectly assumes that structuredClone is available everywhere. According to @evilpie it is only available in:

Anything that uses WindowOrWorkerGlobalScope plus Sandbox

We should change the definition to at least only be available in browser-window & frame scopes rather than globally. That may be a bit restrictive (i.e. not all window spaces), but until it gets added to ESLint's globals, that'll probably be better than what we have now.

Whilst we're here we should also remove these no-undef exclusions:

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/uriloader/exthandler/tests/mochitest/browser_download_preferred_action.js#276-277,285,293

The Bugbug bot thinks this bug is a defect, but please change it back in case of error.

Type: task → defect

Set release status flags based on info from the regressing bug 1745030

Has Regression Range: --- → yes
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d4262b94d3a Match ESLint's definition of structuredClone to where it is actually defined. r=Gijs
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: