Deprecate --gfe2_reloadable_flag_quic_clean_up_spdy_session_destructor.

PiperOrigin-RevId: 343912045
Change-Id: I9fd70aff8f98da4617fef4420ff2b0ad0d252aed
diff --git a/quic/core/http/quic_spdy_session.cc b/quic/core/http/quic_spdy_session.cc
index ceb030c..438352a 100644
--- a/quic/core/http/quic_spdy_session.cc
+++ b/quic/core/http/quic_spdy_session.cc
@@ -422,21 +422,6 @@
       << "QuicSpdyStream use after free. " << destruction_indicator_
       << QuicStackTrace();
   destruction_indicator_ = 987654321;
-
-  if (GetQuicReloadableFlag(quic_clean_up_spdy_session_destructor)) {
-    QUIC_RELOADABLE_FLAG_COUNT(quic_clean_up_spdy_session_destructor);
-    return;
-  }
-  // Set the streams' session pointers in closed and dynamic stream lists
-  // to null to avoid subsequent use of this session.
-  for (auto& stream : *closed_streams()) {
-    static_cast<QuicSpdyStream*>(stream.get())->ClearSession();
-  }
-  for (auto const& kv : stream_map()) {
-    if (!kv.second->is_static()) {
-      static_cast<QuicSpdyStream*>(kv.second.get())->ClearSession();
-    }
-  }
 }
 
 void QuicSpdySession::Initialize() {
diff --git a/quic/core/http/quic_spdy_stream.cc b/quic/core/http/quic_spdy_stream.cc
index 8e5cb1c..afcc28f 100644
--- a/quic/core/http/quic_spdy_stream.cc
+++ b/quic/core/http/quic_spdy_stream.cc
@@ -865,10 +865,6 @@
   }
 }
 
-void QuicSpdyStream::ClearSession() {
-  spdy_session_ = nullptr;
-}
-
 bool QuicSpdyStream::OnDataFrameStart(QuicByteCount header_length,
                                       QuicByteCount payload_length) {
   DCHECK(VersionUsesHttp3(transport_version()));
diff --git a/quic/core/http/quic_spdy_stream.h b/quic/core/http/quic_spdy_stream.h
index c460b6e..1aee532 100644
--- a/quic/core/http/quic_spdy_stream.h
+++ b/quic/core/http/quic_spdy_stream.h
@@ -207,12 +207,6 @@
   // read and consumed or there are no trailers.
   bool FinishedReadingTrailers() const;
 
-  // Called when owning session is getting deleted to avoid subsequent
-  // use of the spdy_session_ member.
-  // TODO(b/136274541): Remove this method once
-  // flag_quic_clean_up_spdy_session_destructor is deprecated.
-  void ClearSession();
-
   // Returns true if the sequencer has delivered the FIN, and no more body bytes
   // will be available.
   bool IsSequencerClosed() { return sequencer()->IsClosed(); }
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index e7d42de..b021175 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -17,7 +17,6 @@
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_bbr2_support_max_bootstrap_cwnd, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_can_send_ack_frequency, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_check_keys_before_writing, true)
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_clean_up_spdy_session_destructor, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_close_connection_in_on_can_write_with_blocked_writer, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_connection_set_initial_self_address, true)
 QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_conservative_bursts, false)