mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 132183 - Chrome registry doesn't handle uppercase package names; normalize all packages to lowercase, r=darin+Neil
This commit is contained in:
parent
d5e67095bf
commit
a12f59b07e
@ -2018,6 +2018,16 @@ CheckVersionFlag(const nsSubstring& aFlag, const nsSubstring& aData,
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
EnsureLowerCase(char *aBuf)
|
||||
{
|
||||
for (; *aBuf; ++aBuf) {
|
||||
char ch = *aBuf;
|
||||
if (ch >= 'A' && ch <= 'Z')
|
||||
*aBuf = ch + 'a' - 'A';
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length,
|
||||
nsILocalFile* aManifest,
|
||||
@ -2083,6 +2093,8 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length,
|
||||
continue;
|
||||
}
|
||||
|
||||
EnsureLowerCase(package);
|
||||
|
||||
// NOTE: We check for platform and xpcnativewrappers modifiers on
|
||||
// content packages, but they are *applied* to content|skin|locale.
|
||||
|
||||
@ -2157,6 +2169,8 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length,
|
||||
continue;
|
||||
}
|
||||
|
||||
EnsureLowerCase(package);
|
||||
|
||||
TriState stAppVersion = eUnspecified;
|
||||
TriState stApp = eUnspecified;
|
||||
|
||||
@ -2205,6 +2219,8 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length,
|
||||
continue;
|
||||
}
|
||||
|
||||
EnsureLowerCase(package);
|
||||
|
||||
TriState stAppVersion = eUnspecified;
|
||||
TriState stApp = eUnspecified;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user