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

RESOLVED FIXED in mozilla37

Status

Testing
Mochitest
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: froydnj, Assigned: froydnj)

Tracking

unspecified
mozilla37
x86_64
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
We don't need to yell about this over and over in our own test suites.  Just fix the code.
(Assignee)

Comment 1

4 years ago
Created attachment 8539424 [details] [diff] [review]
fix deprecated let block construct in specialpowers.js

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+
(Assignee)

Comment 3

4 years ago
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
Last Resolved: 4 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.
(Assignee)

Comment 6

4 years ago
(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.