Chromium Code Reviews| Index: chrome/utility/importer/nss_decryptor_win.cc |
| =================================================================== |
| --- chrome/utility/importer/nss_decryptor_win.cc (revision 221155) |
| +++ chrome/utility/importer/nss_decryptor_win.cc (working copy) |
| @@ -106,12 +106,6 @@ |
| bool NSSDecryptor::InitNSS(const base::FilePath& db_path, |
| base::NativeLibrary plds4_dll, |
| base::NativeLibrary nspr4_dll) { |
| - // NSPR DLLs are already loaded now. |
| - if (plds4_dll == NULL || nspr4_dll == NULL) { |
| - Free(); |
| - return false; |
| - } |
| - |
| // Gets the function address. |
| NSS_Init = (NSSInitFunc) |
| base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "NSS_Init"); |
| @@ -128,10 +122,19 @@ |
| base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "PK11SDR_Decrypt"); |
| SECITEM_FreeItem = (SECITEMFreeItemFunc) |
| base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "SECITEM_FreeItem"); |
| - PL_ArenaFinish = (PLArenaFinishFunc) |
| - base::GetFunctionPointerFromNativeLibrary(plds4_dll, "PL_ArenaFinish"); |
| - PR_Cleanup = (PRCleanupFunc) |
| - base::GetFunctionPointerFromNativeLibrary(nspr4_dll, "PR_Cleanup"); |
| + // On Firefox 22 and higher, PL_ArenaFinish() and PR_Cleanup() are found in |
| + // nss3.dll rather than plds4.dll. |
|
wtc
2013/09/11 23:44:03
plds4.dll => plds4.dll and nspr4.dll.
This is a r
|
| + if (plds4_dll == NULL) { |
| + PL_ArenaFinish = (PLArenaFinishFunc)( |
| + base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "PL_ArenaFinish")); |
| + PR_Cleanup = (PRCleanupFunc)( |
| + base::GetFunctionPointerFromNativeLibrary(nss3_dll_, "PR_Cleanup")); |
| + } else { |
| + PL_ArenaFinish = (PLArenaFinishFunc)( |
| + base::GetFunctionPointerFromNativeLibrary(nspr4_dll, "PL_ArenaFinish")); |
|
Ilya Sherman
2013/09/11 23:39:40
Unless I'm misreading something, this was plds4_dl
wtc
2013/09/11 23:44:03
We need to use plds4_dll here.
|
| + PR_Cleanup = (PRCleanupFunc)( |
| + base::GetFunctionPointerFromNativeLibrary(nspr4_dll, "PR_Cleanup")); |
| + } |
| if (NSS_Init == NULL || NSS_Shutdown == NULL || |
| PK11_GetInternalKeySlot == NULL || PK11_FreeSlot == NULL || |