Fix racy compositor deduction in TelemetryEnvironment. (bug 1194932, r=gfritzsche)

This commit is contained in:
David Anderson 2015-08-24 23:12:53 -04:00
Родитель 3460e34af9
Коммит 352ba00f16
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -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);