From 6c673ed850dc3e9f7afb04036d232e1f35a7417b Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Thu, 10 Mar 2016 15:01:58 +1300 Subject: [PATCH] Bug 1254942 - Redo sanity check whenever buildId changes. r=mchang MozReview-Commit-ID: 826Mt89OuPp --- toolkit/components/gfx/SanityTest.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toolkit/components/gfx/SanityTest.js b/toolkit/components/gfx/SanityTest.js index 6326bf17b820..970e02f4995a 100644 --- a/toolkit/components/gfx/SanityTest.js +++ b/toolkit/components/gfx/SanityTest.js @@ -245,7 +245,7 @@ SanityTest.prototype = { // Only test gfx features if firefox has updated, or if the user has a new // gpu or drivers. var appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); - var xulVersion = appInfo.version; + var buildId = Services.appinfo.platformBuildID; var gfxinfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); if (Preferences.get(RUNNING_PREF, false)) { @@ -270,7 +270,7 @@ SanityTest.prototype = { // TODO: Handle dual GPU setups if (checkPref(DRIVER_PREF, gfxinfo.adapterDriverVersion, REASON_DRIVER_CHANGED) && checkPref(DEVICE_PREF, gfxinfo.adapterDeviceID, REASON_DEVICE_CHANGED) && - checkPref(VERSION_PREF, xulVersion, REASON_FIREFOX_CHANGED)) + checkPref(VERSION_PREF, buildId, REASON_FIREFOX_CHANGED)) { return false; } @@ -280,7 +280,7 @@ SanityTest.prototype = { Preferences.set(DISABLE_VIDEO_PREF, false); Preferences.set(DRIVER_PREF, gfxinfo.adapterDriverVersion); Preferences.set(DEVICE_PREF, gfxinfo.adapterDeviceID); - Preferences.set(VERSION_PREF, xulVersion); + Preferences.set(VERSION_PREF, buildId); // Update the prefs so that this test doesn't run again until the next update. Preferences.set(RUNNING_PREF, true);