зеркало из https://github.com/mozilla/gecko-dev.git
Only allow out-of-process plugins on Mac OS X 10.6 or higher. b=556545 r=bgirard
This commit is contained in:
Родитель
f30edd9ec3
Коммит
8015c79acc
|
@ -314,6 +314,22 @@ namespace {
|
|||
|
||||
#ifdef MOZ_IPC
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
static PRInt32 OSXVersion()
|
||||
{
|
||||
static PRInt32 gOSXVersion = 0x0;
|
||||
if (gOSXVersion == 0x0) {
|
||||
OSErr err = ::Gestalt(gestaltSystemVersion, (SInt32*)&gOSXVersion);
|
||||
if (err != noErr) {
|
||||
// This should probably be changed when our minimum version changes
|
||||
NS_ERROR("Couldn't determine OS X version, assuming 10.5");
|
||||
gOSXVersion = 0x00001050;
|
||||
}
|
||||
}
|
||||
return gOSXVersion;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline PRBool
|
||||
OOPPluginsEnabled(const char* aFilePath)
|
||||
{
|
||||
|
@ -321,6 +337,13 @@ OOPPluginsEnabled(const char* aFilePath)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Only allow on Mac OS X 10.6 or higher.
|
||||
if (OSXVersion() < 0x00001060) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
OSVERSIONINFO osVerInfo = {0};
|
||||
osVerInfo.dwOSVersionInfoSize = sizeof(osVerInfo);
|
||||
|
|
Загрузка…
Ссылка в новой задаче