Bug 611296: Fix bug that caused the Quicktime plugin to fail to load for some Mac OS X users. Don't require that the MIME plist locale match the current locale. r=sgreenlay a=blocking2.0betaN+

This commit is contained in:
Josh Aas 2011-01-07 07:47:41 -05:00
parent 54af1ba72c
commit 8ddaa855bc
2 changed files with 3 additions and 17 deletions

View File

@ -192,8 +192,9 @@ using mozilla::TimeStamp;
// 0.11 file name and full path fields now store expected values on all platforms, bug 488181
// 0.12 force refresh due to quicktime pdf claim fix, bug 611197
// 0.13 add architecture and list of invalid plugins, bug 616271
// 0.14 force refresh due to locale comparison fix, bug 611296
// The current plugin registry version (and the maximum version we know how to read)
static const char *kPluginRegistryVersion = "0.13";
static const char *kPluginRegistryVersion = "0.14";
// The minimum registry version we know how to read
static const char *kMinimumRegistryVersion = "0.9";

View File

@ -212,22 +212,7 @@ static CFDictionaryRef ParsePlistForMIMETypesFilename(CFBundleRef bundle)
if (::CFGetTypeID(propertyList) != ::CFDictionaryGetTypeID()) {
return NULL;
}
CFTypeRef localizedName = ::CFDictionaryGetValue(static_cast<CFDictionaryRef>(propertyList), CFSTR("WebPluginLocalizationName"));
if (!localizedName || ::CFGetTypeID(localizedName) != ::CFStringGetTypeID()) {
return NULL;
}
CFLocaleRef currentLocale = ::CFLocaleCopyCurrent();
if (!currentLocale) {
return NULL;
}
AutoCFTypeObject currentLocaleAutorelease(currentLocale);
if (::CFStringCompare(static_cast<CFStringRef>(localizedName), ::CFLocaleGetIdentifier(currentLocale), 0) != kCFCompareEqualTo) {
return NULL;
}
CFTypeRef mimeTypes = ::CFDictionaryGetValue(static_cast<CFDictionaryRef>(propertyList), CFSTR("WebPluginMIMETypes"));
if (!mimeTypes || ::CFGetTypeID(mimeTypes) != ::CFDictionaryGetTypeID() || ::CFDictionaryGetCount(static_cast<CFDictionaryRef>(mimeTypes)) == 0) {
return NULL;