Closed Bug 1113750 Opened 5 years ago Closed 5 years ago

JavaScript warning: chrome://specialpowers/content/specialpowers.js, line 27: JavaScript 1.7's let blocks are deprecated

Categories

(Testing :: Mochitest, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla37

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

We don't need to yell about this over and over in our own test suites.  Just fix the code.
This warning occurs scores of times in every browser-chrome test run.
There's no need for it to, since we can use supported syntax instead.
Attachment #8539424 - Flags: review?(jmaher)
Comment on attachment 8539424 [details] [diff] [review]
fix deprecated let block construct in specialpowers.js

Review of attachment 8539424 [details] [diff] [review]:
-----------------------------------------------------------------

good stuff.
Attachment #8539424 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/f2c81560f516
Assignee: nobody → nfroyd
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/f2c81560f516
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Do fat arrow functions work with addObserver? If so you could have used that and dropped the self bit entirely.
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #5)
> Do fat arrow functions work with addObserver? If so you could have used that
> and dropped the self bit entirely.

Don't see why they wouldn't, but then one also needs to figure out what to do with the removeObserver call:

https://hg.mozilla.org/mozilla-central/rev/f2c81560f516#l1.27
You need to log in before you can comment on or make changes to this bug.