From 352ba00f160166d3b9c89e989304c3c026f0315e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 24 Aug 2015 23:12:53 -0400 Subject: [PATCH] Fix racy compositor deduction in TelemetryEnvironment. (bug 1194932, r=gfritzsche) --- toolkit/components/telemetry/TelemetryEnvironment.jsm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm index 11f20179fa8d..4b6e05a5f234 100644 --- a/toolkit/components/telemetry/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm @@ -680,6 +680,7 @@ function EnvironmentCache() { this._startWatchingPrefs(); this._addonBuilder.watchForChanges(); this._addObservers(); + this._updateGraphicsFeatures(); return this.currentEnvironment; }; @@ -851,7 +852,7 @@ EnvironmentCache.prototype = { // Full graphics information is not available until we have created at // least one off-main-thread-composited window. Thus we wait for the // first compositor to be created and then query nsIGfxInfo again. - this._onCompositorCreated(); + this._updateGraphicsFeatures(); break; case SANITY_TEST_FAILED_TOPIC: this._onGraphicsSanityTestFailed(aData); @@ -925,7 +926,7 @@ EnvironmentCache.prototype = { /** * Update the graphics features object. */ - _onCompositorCreated: function () { + _updateGraphicsFeatures: function () { let gfxData = this._currentEnvironment.system.gfx; try { let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);