mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Bug 1141783 - Correct user message for mismatched drivers. Don't mismatch if the DLLs are missing. r=jrmuizelaar
--HG-- extra : rebase_source : 31475a7405a58dc211c1057c9e8c4b33abd3b70a extra : histedit_source : c8b0dd8cea9f1b36a48f6597bcf4bc90faf7517b
This commit is contained in:
parent
2e3823f252
commit
34537c60ae
@ -59,6 +59,9 @@ blockedGfxCard = Blocked for your graphics card because of unresolved driver iss
|
||||
# LOCALIZATION NOTE The verb "blocked" here refers to a graphics feature such as "Direct2D" or "OpenGL layers".
|
||||
blockedOSVersion = Blocked for your operating system version.
|
||||
|
||||
# LOCALIZATION NOTE The verb "blocked" here refers to a graphics feature such as "Direct2D" or "OpenGL layers".
|
||||
blockedMismatchedVersion = Blocked for your graphics driver version mismatch between registry and DLL.
|
||||
|
||||
direct2DEnabled = Direct2D Enabled
|
||||
directWriteEnabled = DirectWrite Enabled
|
||||
clearTypeParameters = ClearType Parameters
|
||||
|
@ -284,6 +284,9 @@ let dataProviders = {
|
||||
["tryNewerDriver", suggestedDriverVersion] :
|
||||
["blockedDriver"];
|
||||
break;
|
||||
case Ci.nsIGfxInfo.FEATURE_BLOCKED_MISMATCHED_VERSION:
|
||||
msg = ["blockedMismatchedVersion"];
|
||||
break;
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
@ -361,7 +361,8 @@ BlacklistFeatureStatusToGfxFeatureStatus(const nsAString& aStatus)
|
||||
else if (aStatus.EqualsLiteral("BLOCKED_OS_VERSION"))
|
||||
return nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
|
||||
|
||||
// Do not allow it to set STATUS_UNKNOWN.
|
||||
// Do not allow it to set STATUS_UNKNOWN. Also, we are not
|
||||
// expecting the "mismatch" status showing up here.
|
||||
|
||||
return nsIGfxInfo::FEATURE_STATUS_OK;
|
||||
}
|
||||
@ -986,6 +987,7 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray<GfxDriverInfo>& aDriverInfo)
|
||||
}
|
||||
// FALLTHROUGH
|
||||
|
||||
case nsIGfxInfo::FEATURE_BLOCKED_MISMATCHED_VERSION:
|
||||
case nsIGfxInfo::FEATURE_BLOCKED_DEVICE:
|
||||
case nsIGfxInfo::FEATURE_DISCOURAGED:
|
||||
case nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION:
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
/* NOTE: this interface is completely undesigned, not stable and likely to change */
|
||||
|
||||
[scriptable, uuid(74fdaac3-e5ce-4944-becc-c08c168f673c)]
|
||||
[scriptable, uuid(b0cd9d34-8dba-4b1d-8126-ca21826dbf35)]
|
||||
interface nsIGfxInfo : nsISupports
|
||||
{
|
||||
/*
|
||||
@ -96,7 +96,7 @@ interface nsIGfxInfo : nsISupports
|
||||
* A set of return values from GetFeatureStatus
|
||||
*/
|
||||
|
||||
/* The driver is save to the best of our knowledge */
|
||||
/* The driver is safe to the best of our knowledge */
|
||||
const long FEATURE_STATUS_OK = 1;
|
||||
/* We don't know the status of the feature yet. The analysis probably hasn't finished yet. */
|
||||
const long FEATURE_STATUS_UNKNOWN = 2;
|
||||
@ -110,6 +110,8 @@ interface nsIGfxInfo : nsISupports
|
||||
const long FEATURE_DISCOURAGED = 5;
|
||||
/* This feature is blocked on this OS version. */
|
||||
const long FEATURE_BLOCKED_OS_VERSION = 6;
|
||||
/* This feature is blocked because of mismatched driver versions. */
|
||||
const long FEATURE_BLOCKED_MISMATCHED_VERSION = 7;
|
||||
|
||||
/**
|
||||
* Ask about a feature, and return the status of that feature
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "prprf.h"
|
||||
#include "GfxDriverInfo.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/gfx/Logging.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
@ -523,18 +524,25 @@ GfxInfo::Init()
|
||||
driverNumericVersion = 0, knownSafeMismatchVersion = 0;
|
||||
ParseDriverVersion(dllVersion, &dllNumericVersion);
|
||||
ParseDriverVersion(dllVersion2, &dllNumericVersion2);
|
||||
|
||||
ParseDriverVersion(mDriverVersion, &driverNumericVersion);
|
||||
ParseDriverVersion(NS_LITERAL_STRING("9.17.10.0"), &knownSafeMismatchVersion);
|
||||
|
||||
// If there's a driver version mismatch, consider this harmful only when
|
||||
// the driver version is less than knownSafeMismatchVersion. See the
|
||||
// above comment about crashes with old mismatches. If the GetDllVersion
|
||||
// call fails, then they return 0, so that will be considered a mismatch.
|
||||
if (dllNumericVersion != driverNumericVersion &&
|
||||
dllNumericVersion2 != driverNumericVersion &&
|
||||
(driverNumericVersion < knownSafeMismatchVersion ||
|
||||
std::max(dllNumericVersion, dllNumericVersion2) < knownSafeMismatchVersion)) {
|
||||
mHasDriverVersionMismatch = true;
|
||||
// above comment about crashes with old mismatches. If the GetDllVersion
|
||||
// call fails, we are not calling it a mismatch.
|
||||
if ((dllNumericVersion != 0 && dllNumericVersion != driverNumericVersion) ||
|
||||
(dllNumericVersion2 != 0 && dllNumericVersion2 != driverNumericVersion)) {
|
||||
if (driverNumericVersion < knownSafeMismatchVersion ||
|
||||
std::max(dllNumericVersion, dllNumericVersion2) < knownSafeMismatchVersion) {
|
||||
mHasDriverVersionMismatch = true;
|
||||
gfxWarningOnce() << "Mismatched driver versions between the registry " << mDriverVersion.get() << " and DLL(s) " << NS_ConvertUTF16toUTF8(dllVersion).get() << ", " << NS_ConvertUTF16toUTF8(dllVersion2).get() << " reported.";
|
||||
}
|
||||
} else if (dllNumericVersion == 0 && dllNumericVersion2 == 0) {
|
||||
// Leave it as an asserting error for now, to see if we can find
|
||||
// a system that exhibits this kind of a problem internally.
|
||||
gfxCriticalErrorOnce() << "Potential driver version mismatch ignored due to missing DLLs";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1200,7 +1208,7 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
|
||||
os = DRIVER_OS_WINDOWS_XP;
|
||||
|
||||
if (mHasDriverVersionMismatch) {
|
||||
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION;
|
||||
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_MISMATCHED_VERSION;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user