diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 07:02:54 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 07:02:54 +0000 |
commit | 7025e931b4a1a297f802c1de3ad9a76d3cdd7006 (patch) | |
tree | ac6d517f6e892fc74b424de7d568cd83fccb5402 /crypto/nss_util.cc | |
parent | 8a8f4d1a570302b00c7c2a64c699a108621893ec (diff) | |
download | chromium_src-7025e931b4a1a297f802c1de3ad9a76d3cdd7006.zip chromium_src-7025e931b4a1a297f802c1de3ad9a76d3cdd7006.tar.gz chromium_src-7025e931b4a1a297f802c1de3ad9a76d3cdd7006.tar.bz2 |
Reland: Implement ScopedTestNSSDB instead of OpenTestNSSDB()
This CL needs memory suppression because of missing CloseTestNSSDB().
See also TODO.
BUG=136950, 156433
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=162327
Review URL: https://chromiumcodereview.appspot.com/11174006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162659 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/nss_util.cc')
-rw-r--r-- | crypto/nss_util.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index db89a70..47b4d06 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc @@ -702,8 +702,14 @@ bool CheckNSSVersion(const char* version) { } #if defined(USE_NSS) -bool OpenTestNSSDB() { - return g_nss_singleton.Get().OpenTestNSSDB(); +ScopedTestNSSDB::ScopedTestNSSDB() + : is_open_(g_nss_singleton.Get().OpenTestNSSDB()) { +} + +ScopedTestNSSDB::~ScopedTestNSSDB() { + // TODO(mattm): Close the dababase once NSS 3.14 is required, + // which fixes https://bugzilla.mozilla.org/show_bug.cgi?id=588269 + // Resource leaks are suppressed. http://crbug.com/156433 . } base::Lock* GetNSSWriteLock() { |