summaryrefslogtreecommitdiffstats
path: root/base/nss_init.cc
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 16:02:31 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 16:02:31 +0000
commitc72f16a764f26fc27c2d8fcc2099076ea1d63b59 (patch)
tree49797157de966a36d29f99fd8dadd833cadb8062 /base/nss_init.cc
parentb640603331a241ea5a93362c0897055294a89e10 (diff)
downloadchromium_src-c72f16a764f26fc27c2d8fcc2099076ea1d63b59.zip
chromium_src-c72f16a764f26fc27c2d8fcc2099076ea1d63b59.tar.gz
chromium_src-c72f16a764f26fc27c2d8fcc2099076ea1d63b59.tar.bz2
Call two more shutdown functions, and set an environment variable,
to make nss play well with valgrind, as recommended by Wan-Teh in http://groups.google.com/group/mozilla.dev.tech.crypto/msg/49fe8582df376d06 Set the same environment variables in chrome_test.sh/valgrind_test.py and valgrind.sh, and explain which is which. Review URL: http://codereview.chromium.org/42326 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/nss_init.cc')
-rw-r--r--base/nss_init.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/nss_init.cc b/base/nss_init.cc
index e3ce1ae..c0114b7 100644
--- a/base/nss_init.cc
+++ b/base/nss_init.cc
@@ -5,6 +5,8 @@
#include "base/nss_init.h"
#include <nss.h>
+#include <plarena.h>
+#include <prinit.h>
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424
// until NSS 3.12.2 comes out and we update to it.
@@ -76,7 +78,14 @@ class NSSInitSingleton {
if (status != SECSuccess)
LOG(ERROR) << "NSS_Shutdown failed, leak? See "
"http://code.google.com/p/chromium/issues/detail?id=4609";
+
+ PL_ArenaFinish();
+
+ PRStatus prstatus = PR_Cleanup();
+ if (prstatus != PR_SUCCESS)
+ LOG(ERROR) << "PR_Cleanup failed?";
}
+
private:
SECMODModule *root_;
};