| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/quic/core/quic_server_session_base.h" | 5 #include "net/quic/core/quic_server_session_base.h" |
| 6 | 6 |
| 7 #include <cstdint> | 7 #include <cstdint> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 598 |
| 599 INSTANTIATE_TEST_CASE_P(StreamMemberLifetimeTests, | 599 INSTANTIATE_TEST_CASE_P(StreamMemberLifetimeTests, |
| 600 StreamMemberLifetimeTest, | 600 StreamMemberLifetimeTest, |
| 601 ::testing::ValuesIn(AllSupportedVersions())); | 601 ::testing::ValuesIn(AllSupportedVersions())); |
| 602 | 602 |
| 603 // Trigger an operation which causes an async invocation of | 603 // Trigger an operation which causes an async invocation of |
| 604 // ProofSource::GetProof. Delay the completion of the operation until after the | 604 // ProofSource::GetProof. Delay the completion of the operation until after the |
| 605 // stream has been destroyed, and verify that there are no memory bugs. | 605 // stream has been destroyed, and verify that there are no memory bugs. |
| 606 TEST_P(StreamMemberLifetimeTest, Basic) { | 606 TEST_P(StreamMemberLifetimeTest, Basic) { |
| 607 FLAGS_enable_async_get_proof = true; | 607 FLAGS_enable_async_get_proof = true; |
| 608 FLAGS_quic_buffer_packet_till_chlo = true; | |
| 609 FLAGS_enable_quic_stateless_reject_support = true; | 608 FLAGS_enable_quic_stateless_reject_support = true; |
| 610 FLAGS_quic_use_cheap_stateless_rejects = true; | 609 FLAGS_quic_use_cheap_stateless_rejects = true; |
| 611 FLAGS_quic_create_session_after_insertion = true; | 610 FLAGS_quic_create_session_after_insertion = true; |
| 612 | 611 |
| 613 const QuicClock* clock = helper_.GetClock(); | 612 const QuicClock* clock = helper_.GetClock(); |
| 614 QuicVersion version = AllSupportedVersions().front(); | 613 QuicVersion version = AllSupportedVersions().front(); |
| 615 CryptoHandshakeMessage chlo = CryptoTestUtils::GenerateDefaultInchoateCHLO( | 614 CryptoHandshakeMessage chlo = CryptoTestUtils::GenerateDefaultInchoateCHLO( |
| 616 clock, version, &crypto_config_); | 615 clock, version, &crypto_config_); |
| 617 chlo.SetVector(kCOPT, QuicTagVector{kSREJ}); | 616 chlo.SetVector(kCOPT, QuicTagVector{kSREJ}); |
| 618 std::vector<QuicVersion> packet_version_list = {version}; | 617 std::vector<QuicVersion> packet_version_list = {version}; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 646 | 645 |
| 647 // Allow the async ProofSource::GetProof call to complete. Verify (under | 646 // Allow the async ProofSource::GetProof call to complete. Verify (under |
| 648 // asan) that this does not result in accesses to any freed memory from the | 647 // asan) that this does not result in accesses to any freed memory from the |
| 649 // session or its subobjects. | 648 // session or its subobjects. |
| 650 GetFakeProofSource()->InvokePendingCallback(0); | 649 GetFakeProofSource()->InvokePendingCallback(0); |
| 651 } | 650 } |
| 652 | 651 |
| 653 } // namespace | 652 } // namespace |
| 654 } // namespace test | 653 } // namespace test |
| 655 } // namespace net | 654 } // namespace net |
| OLD | NEW |