зеркало из https://github.com/mozilla/gecko-dev.git
Fix for OS X crash with bundle type plugins bug 98729 r=beard sr=attinasi
This commit is contained in:
Родитель
9e991256e0
Коммит
355745949d
|
@ -831,6 +831,10 @@ nsPluginTag::nsPluginTag(nsPluginInfo* aPluginInfo)
|
||||||
mLibrary = nsnull;
|
mLibrary = nsnull;
|
||||||
mCanUnloadLibrary = PR_TRUE;
|
mCanUnloadLibrary = PR_TRUE;
|
||||||
mEntryPoint = nsnull;
|
mEntryPoint = nsnull;
|
||||||
|
|
||||||
|
#if TARGET_CARBON
|
||||||
|
mCanUnloadLibrary = !aPluginInfo->fBundle;
|
||||||
|
#endif
|
||||||
mFlags = NS_PLUGIN_FLAG_ENABLED;
|
mFlags = NS_PLUGIN_FLAG_ENABLED;
|
||||||
mXPConnected = PR_FALSE;
|
mXPConnected = PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,9 @@ struct nsPluginInfo {
|
||||||
char** fExtensionArray;
|
char** fExtensionArray;
|
||||||
char* fFileName;
|
char* fFileName;
|
||||||
char* fFullPath;
|
char* fFullPath;
|
||||||
|
#if TARGET_CARBON
|
||||||
|
PRBool fBundle;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -259,6 +259,15 @@ nsresult nsPluginFile::GetPluginInfo(nsPluginInfo& info)
|
||||||
info.fFileName = p2cstrdup(spec.name);
|
info.fFileName = p2cstrdup(spec.name);
|
||||||
info.fFullPath = PL_strdup(this->GetCString());
|
info.fFullPath = PL_strdup(this->GetCString());
|
||||||
|
|
||||||
|
#if TARGET_CARBON
|
||||||
|
CFBundleRef bundle = getPluginBundle(spec);
|
||||||
|
if (bundle) {
|
||||||
|
info.fBundle = PR_TRUE;
|
||||||
|
CFRelease(bundle);
|
||||||
|
} else
|
||||||
|
info.fBundle = PR_FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
short mimeIndex = 1, descriptionIndex = 1;
|
short mimeIndex = 1, descriptionIndex = 1;
|
||||||
for (int i = 0; i < variantCount; i++) {
|
for (int i = 0; i < variantCount; i++) {
|
||||||
info.fMimeTypeArray[i] = GetPluginString(128, mimeIndex++);
|
info.fMimeTypeArray[i] = GetPluginString(128, mimeIndex++);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче