Commit 4062b7c4 authored by mmenke@chromium.org's avatar mmenke@chromium.org

Fix NetLog thread safety issue introduced in

http://codereview.chromium.org/10539094/.

We weren't holding on to a reference for an
x509Certificate passed to another thread for logging.

BUG=126243

Review URL: https://chromiumcodereview.appspot.com/10534117

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141812 0039d316-1c4b-4281-b951-d872f2087c98
parent eef23ec5
......@@ -2529,9 +2529,11 @@ void SSLClientSocketNSS::Core::UpdateServerCert() {
nss_handshake_state_.server_cert = X509Certificate::CreateFromDERCertChain(
nss_handshake_state_.server_cert_chain.AsStringPieceVector());
if (nss_handshake_state_.server_cert) {
// Since this will be called asynchronously on another thread, it needs to
// own a reference to the certificate.
NetLog::ParametersCallback net_log_callback =
base::Bind(&NetLogX509CertificateCallback,
base::Unretained(nss_handshake_state_.server_cert.get()));
nss_handshake_state_.server_cert);
PostOrRunCallback(
FROM_HERE,
base::Bind(&AddLogEventWithCallback, weak_net_log_,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment