Closed Bug 1157644 Opened 9 years ago Closed 9 years ago

TelemetryEnvironment is not triggering environment changes when preferences are changed

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: Dexter, Assigned: Dexter)

References

Details

Attachments

(1 file)

TelemetryEnvironment is not notifying environment changes when a watched preference is changed even though |test_TelemetryEnvironment.js| works.

This is happening because in [1] we're not correctly iterating the preferences Map. We've got different solutions for this:

- [1] could be changed to |for (let pref of this._watchedPrefs.keys()) {| and the tests updated accordingly to use a |Map| instead of a javascript object.
- [2] could be changed to the form |{"the.prop": TelemetryEnvironment.PREF_STATE,}|, leaving the tests as they are.

[1] - https://hg.mozilla.org/mozilla-central/annotate/a9311ec2dd39/toolkit/components/telemetry/TelemetryEnvironment.jsm#l779
[2] - https://hg.mozilla.org/mozilla-central/annotate/a9311ec2dd39/toolkit/components/telemetry/TelemetryEnvironment.jsm#l79
Blocks: 1120356, 1140558
Assignee: nobody → alessio.placitelli
Attached patch bug1157644.patchSplinter Review
This patch fixes environment changes not being triggered on pref changes.
Attachment #8597242 - Flags: review?(gfritzsche)
Comment on attachment 8597242 [details] [diff] [review]
bug1157644.patch

stealing review
Attachment #8597242 - Flags: review?(gfritzsche) → review+
Status: NEW → ASSIGNED
https://hg.mozilla.org/integration/fx-team/rev/2a22a1013ae0
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/2a22a1013ae0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: