Closed
Bug 1285921
Opened 8 years ago
Closed 8 years ago
setEmptyPrefWatchList() doesn't wait for TelemetryEnvironment to initialize
Categories
(Toolkit :: Telemetry, defect, P1)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
mozilla51
People
(Reporter: gfritzsche, Assigned: gfritzsche)
Details
(Whiteboard: [measurement:client])
Attachments
(1 file, 1 obsolete file)
17.98 KB,
patch
|
Dexter
:
review+
|
Details | Diff | Splinter Review |
After bug 1273889, Preferences.ignore() on unwatched preferences will lead to errors reported in the console. > This shows many exceptions like this: > > "CONSOLE_MESSAGE: (info) 1468205679500 Toolkit.Telemetry TRACE TelemetryEnvironment::_stopWatchingPrefs" > > "CONSOLE_MESSAGE: (error) [JavaScript Error: "Attempt to stop observing a preference "app.feedback.baseURL" that's not being observed" {file: "resource://gre/modules/Preferences.jsm" line: 323}] > > Preferences.ignore@resource://gre/modules/Preferences.jsm:323:5 > > EnvironmentCache.prototype._stopWatchingPrefs@resource://gre/modules/TelemetryEnvironment.jsm:913:9 > > These are explained by bug 1273889, which made `Preferences.ignore()` report > an error on trying to stop watching unwatched prefs. > That is just error output though and shouldn't make the test fail. This shows that our test fix for TelemetryEnvironment not watching prefs by default [1] is racey. If TelemetryEnvironment is still async initializing, it might not have called `_startWatchingPrefs()` yet [2]. In that case, `_watchPreferences()` (called from `testWatchPreferences()`) tries to .ignore() preferences that are not watched yet at [3]. [1] https://dxr.mozilla.org/mozilla-central/rev/23dc78b7b57e9f91798ea44c242a04e112c37db0/toolkit/components/telemetry/tests/unit/head.js#288 [2] https://dxr.mozilla.org/mozilla-central/rev/23dc78b7b57e9f91798ea44c242a04e112c37db0/toolkit/components/telemetry/TelemetryEnvironment.jsm#769 [3] https://dxr.mozilla.org/mozilla-central/rev/23dc78b7b57e9f91798ea44c242a04e112c37db0/toolkit/components/telemetry/TelemetryEnvironment.jsm#852
Assignee | ||
Comment 1•8 years ago
|
||
One solution is to always wait for TelemetryEnvironment to finish initializing.
Assignee | ||
Comment 2•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f2232f567f98
Attachment #8769649 -
Flags: review?(alessio.placitelli)
Comment 3•8 years ago
|
||
Comment on attachment 8769649 [details] [diff] [review] setEmptyPrefWatchList() doesn't wait for TelemetryEnvironment to initialize Review of attachment 8769649 [details] [diff] [review]: ----------------------------------------------------------------- This looks good, do we need to remove the other use of |do_test_pending|? ::: toolkit/components/telemetry/tests/unit/test_TelemetryController_idle.js @@ +20,1 @@ > do_test_pending(); Should this be removed, along with |do_test_finished| a few lines below?
Attachment #8769649 -
Flags: review?(alessio.placitelli) → feedback+
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8769660 -
Flags: review?(alessio.placitelli)
Assignee | ||
Updated•8 years ago
|
Attachment #8769649 -
Attachment is obsolete: true
Updated•8 years ago
|
Attachment #8769660 -
Flags: review?(alessio.placitelli) → review+
Updated•8 years ago
|
Whiteboard: [measurement:client]
Pushed by georg.fritzsche@googlemail.com: https://hg.mozilla.org/integration/fx-team/rev/9dae91a2c31d setEmptyPrefWatchList() doesn't wait for TelemetryEnvironment to initialize. r=dexter
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9dae91a2c31d
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•