Commit 56d60694 authored by tzik's avatar tzik Committed by Commit Bot

Avoid a reference cycle between SSLPrivateKeyInternal and mojom::SSLPrivateKey

SSLPrivateKeyInternal owns mojom::SSLPrivateKey, and mojom::SSLPrivateKey
has a reference to SSLPrivateKeyInternal. That keeps both of them alive
until a connection error happens.

This CL removes the reference from mojom::SSLPK to SSLPKI to remove the
cycle.

Bug: 866456
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Iab0a8bcd16663520873b6b7b29d9326755d93600
Reviewed-on: https://chromium-review.googlesource.com/1148095Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578186}
parent ff0f61b5
......@@ -231,7 +231,8 @@ class SSLPrivateKeyInternal : public net::SSLPrivateKey {
: algorithm_perferences_(algorithm_perferences),
ssl_private_key_(std::move(ssl_private_key)) {
ssl_private_key_.set_connection_error_handler(
base::BindOnce(&SSLPrivateKeyInternal::HandleSSLPrivateKeyError, this));
base::BindOnce(&SSLPrivateKeyInternal::HandleSSLPrivateKeyError,
base::Unretained(this)));
}
// net::SSLPrivateKey:
......
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