From 1d5dcf6dfee3008b48d67e788ac253d5d061aca9 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Fri, 9 Oct 2020 22:03:12 +0800 Subject: [PATCH] Fix incorrect use of temporary --- src/net/tools/naive/naive_proxy_bin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/tools/naive/naive_proxy_bin.cc b/src/net/tools/naive/naive_proxy_bin.cc index 4ba08712dd..60b86f5b2e 100644 --- a/src/net/tools/naive/naive_proxy_bin.cc +++ b/src/net/tools/naive/naive_proxy_bin.cc @@ -438,8 +438,8 @@ std::unique_ptr BuildURLRequestContext( if (proxy_url.compare(0, 7, "quic://") == 0) { proxy_url.replace(0, 4, "https"); auto* quic = context->quic_context()->params(); - quic->supported_versions.assign(quic::SupportedVersions().begin(), - quic::SupportedVersions().end()); + const auto& versions = quic::SupportedVersions(); + quic->supported_versions.assign(versions.begin(), versions.end()); quic->origins_to_force_quic_on.insert( net::HostPortPair::FromURL(GURL(proxy_url))); }