зеркало из https://github.com/mozilla/gecko-dev.git
bug 1039642 - stop PKCS#11 module threads before deleting them r=jcj r=mmc a=metered
This commit is contained in:
Родитель
ed89946621
Коммит
2a4f463dac
|
@ -50,21 +50,22 @@ nsPkcs11::DeleteModule(const nsAString& aModuleName)
|
|||
}
|
||||
|
||||
NS_ConvertUTF16toUTF8 modName(aModuleName);
|
||||
#ifndef MOZ_NO_SMART_CARDS
|
||||
SECMODModule* module = SECMOD_FindModule(modName.get());
|
||||
if (!module) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nssComponent->ShutdownSmartCardThread(module);
|
||||
SECMOD_DestroyModule(module);
|
||||
#endif
|
||||
|
||||
int32_t modType;
|
||||
SECStatus srv = SECMOD_DeleteModule(modName.get(), &modType);
|
||||
if (srv == SECSuccess) {
|
||||
SECMODModule *module = SECMOD_FindModule(modName.get());
|
||||
if (module) {
|
||||
#ifndef MOZ_NO_SMART_CARDS
|
||||
nssComponent->ShutdownSmartCardThread(module);
|
||||
#endif
|
||||
SECMOD_DestroyModule(module);
|
||||
}
|
||||
rv = NS_OK;
|
||||
} else {
|
||||
rv = NS_ERROR_FAILURE;
|
||||
if (srv != SECSuccess) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//Add a new PKCS11 module to the user's profile.
|
||||
|
|
Загрузка…
Ссылка в новой задаче