Add QUIC_BUG_IF to QuicUtils::GetCryptoStreamId
In QUIC versions that use CRYPTO frames (instead of stream 1 frames) for
the crypto handshake, the concept of a "crypto stream ID" makes no
sense, so QuicUtils::GetCryptoStreamId should hit a QUIC_BUG_IF to
prevent its misuse.
gfe-relnote: Add QUIC_BUG_IF protected behind QuicVersionUsesCryptoFrames
PiperOrigin-RevId: 248463613
Change-Id: If6768658e9ffc058778b53a91f95839826602fbf
diff --git a/quic/core/quic_crypto_stream.h b/quic/core/quic_crypto_stream.h
index 0c6d08a..1b641b1 100644
--- a/quic/core/quic_crypto_stream.h
+++ b/quic/core/quic_crypto_stream.h
@@ -92,7 +92,7 @@
// Returns whether there are any bytes pending retransmission in CRYPTO
// frames.
- virtual bool HasPendingCryptoRetransmission();
+ virtual bool HasPendingCryptoRetransmission() const;
// Writes any pending CRYPTO frame retransmissions.
void WritePendingCryptoRetransmission();