summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_nss.h
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-12 02:05:08 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-12 02:05:08 +0000
commit93c57688364aab3692bb3b1624eef2bbe0fe0775 (patch)
tree9aa2970a3b60a642db6353a8346c60c00b3fa337 /net/socket/ssl_client_socket_nss.h
parentd9b545cf38a8fb8942e2559623d4b8032b33c954 (diff)
downloadchromium_src-93c57688364aab3692bb3b1624eef2bbe0fe0775.zip
chromium_src-93c57688364aab3692bb3b1624eef2bbe0fe0775.tar.gz
chromium_src-93c57688364aab3692bb3b1624eef2bbe0fe0775.tar.bz2
In Dev build, we would like to see if SSLClientSocketNSS object
is Connected and Disconnected on the same thread. Wan-Teh and I had thought it is more logical to disconnect the transport socket before closing the NSS SSL socket (and the underlying memory buffers). Test to see if this stops memory corruption crashes, will revert after a Dev release. BUG=65948 TEST=accessing google.com and gmail via https and sync'ing of personal stuff. Review URL: http://codereview.chromium.org/6474027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_nss.h')
-rw-r--r--net/socket/ssl_client_socket_nss.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h
index 836c279..b3a1feb 100644
--- a/net/socket/ssl_client_socket_nss.h
+++ b/net/socket/ssl_client_socket_nss.h
@@ -15,6 +15,8 @@
#include <vector>
#include "base/scoped_ptr.h"
+#include "base/synchronization/lock.h"
+#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "base/timer.h"
#include "net/base/cert_verify_result.h"
@@ -165,6 +167,11 @@ class SSLClientSocketNSS : public SSLClientSocket {
// argument.
static void HandshakeCallback(PRFileDesc* socket, void* arg);
+ // The following methods are for debugging bug 65948. Will remove this code
+ // after fixing bug 65948.
+ void EnsureThreadIdAssigned() const;
+ bool CalledOnValidThread() const;
+
CompletionCallbackImpl<SSLClientSocketNSS> buffer_send_callback_;
CompletionCallbackImpl<SSLClientSocketNSS> buffer_recv_callback_;
bool transport_send_busy_;
@@ -262,6 +269,14 @@ class SSLClientSocketNSS : public SSLClientSocket {
scoped_ptr<SSLHostInfo> ssl_host_info_;
DnsCertProvenanceChecker* const dns_cert_checker_;
+
+ // The following two variables are added for debugging bug 65948. Will
+ // remove this code after fixing bug 65948.
+ // Added the following code Debugging in release mode.
+ mutable base::Lock lock_;
+ // This is mutable so that CalledOnValidThread can set it.
+ // It's guarded by |lock_|.
+ mutable base::PlatformThreadId valid_thread_id_;
};
} // namespace net