Use Array.prototype.includes in Telemetry code

RESOLVED FIXED in Firefox 47

Status

()

defect
P1
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: gfritzsche, Assigned: gfritzsche)

Tracking

unspecified
mozilla47
Points:
1

Firefox Tracking Flags

(firefox47 fixed)

Details

(Whiteboard: [measurement:client])

Attachments

(1 attachment, 2 obsolete attachments)

Use Array.prototype.includes in Telemetry code
We have Array.prototype.includes since Fx 43, which is much more readable than the previous a.indexOf(b) based idiom.
Attachment #8717883 - Flags: review?(alessio.placitelli)
Points: --- → 1
Priority: -- → P1
Whiteboard: [measurement:client]
Attachment #8717884 - Flags: review?(alessio.placitelli)
Attachment #8717883 - Attachment is obsolete: true
Attachment #8717883 - Flags: review?(alessio.placitelli)
Attachment #8717884 - Flags: review?(alessio.placitelli) → review+
There's only one occurrence in the tests, in case you want to take care of that one as well: https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js#409
Attachment #8717884 - Attachment is obsolete: true
Attachment #8717891 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/743097ee7470
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.