gfe-relnote: (n/a) In quic::test::TestQuicSpdyServerSession, do not call Initialize() in constructor. Test only, not protected.
Initialize() is a virtual function, it's not safe to call in a constructor.
PiperOrigin-RevId: 282025639
Change-Id: I9492b3b7b8f143a3db43abf191655e1984b83c5e
diff --git a/quic/test_tools/quic_test_utils.cc b/quic/test_tools/quic_test_utils.cc
index 1d2ec74..4b10826 100644
--- a/quic/test_tools/quic_test_utils.cc
+++ b/quic/test_tools/quic_test_utils.cc
@@ -652,7 +652,6 @@
&helper_,
crypto_config,
compressed_certs_cache) {
- Initialize();
ON_CALL(helper_, CanAcceptClientHello(_, _, _, _, _))
.WillByDefault(testing::Return(true));
}
@@ -1181,6 +1180,7 @@
*server_session = new TestQuicSpdyServerSession(
*server_connection, DefaultQuicConfig(), supported_versions,
server_crypto_config, compressed_certs_cache);
+ (*server_session)->Initialize();
// We advance the clock initially because the default time is zero and the
// strike register worries that we've just overflowed a uint32_t time.