Make QuicSession own its perspective
It's often best for us to all find our own perspective in life instead of relying on others. In particular, QuicSession should take control of its destiny and own its perspective as opposed to relying on QuicConnection. We thought we could rely on our trusty connection, we were after all long friends but one day we realized that connection is not as reliable a friend as we were hoping. Especially when we're feeling at our utmost low point (the QuicSession destructor), we may destroy streams that ask us to log the perspective, and the connection has already left us for better pastures. And SIGSEGV isn't our favorite kind of party.
gfe-relnote: extend lifetime of perspective, no behavior change, not flag protected
PiperOrigin-RevId: 286237062
Change-Id: I77b4f78f4f685f151266faab78ddd25d973d9fb6
diff --git a/quic/test_tools/quic_session_peer.h b/quic/test_tools/quic_session_peer.h
index 446cd67..72caa91 100644
--- a/quic/test_tools/quic_session_peer.h
+++ b/quic/test_tools/quic_session_peer.h
@@ -82,6 +82,7 @@
static PendingStream* GetPendingStream(QuicSession* session,
QuicStreamId stream_id);
static void set_is_configured(QuicSession* session, bool value);
+ static void SetPerspective(QuicSession* session, Perspective perspective);
};
} // namespace test