Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1634)

Unified Diff: net/quic/quic_unacked_packet_map.cc

Issue 182523002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed rch's comments in Patch set 1 of CL 181463007 Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_unacked_packet_map.cc
diff --git a/net/quic/quic_unacked_packet_map.cc b/net/quic/quic_unacked_packet_map.cc
index bcafa5635c2c2dedf6e880691fe39d6480fc0d32..c222ac91af966c666b3b9a32e3211fff3f7a9dbb 100644
--- a/net/quic/quic_unacked_packet_map.cc
+++ b/net/quic/quic_unacked_packet_map.cc
@@ -205,11 +205,16 @@ bool QuicUnackedPacketMap::IsPending(
void QuicUnackedPacketMap::SetNotPending(
QuicPacketSequenceNumber sequence_number) {
- if (unacked_packets_[sequence_number].pending) {
- LOG_IF(DFATAL,
- bytes_in_flight_ < unacked_packets_[sequence_number].bytes_sent);
- bytes_in_flight_ -= unacked_packets_[sequence_number].bytes_sent;
- unacked_packets_[sequence_number].pending = false;
+ UnackedPacketMap::iterator it = unacked_packets_.find(sequence_number);
+ if (it == unacked_packets_.end()) {
+ LOG(DFATAL) << "SetNotPending called for packet that is not unacked: "
+ << sequence_number;
+ return;
+ }
+ if (it->second.pending) {
+ LOG_IF(DFATAL, bytes_in_flight_ < it->second.bytes_sent);
+ bytes_in_flight_ -= it->second.bytes_sent;
+ it->second.pending = false;
}
}
« no previous file with comments | « net/quic/quic_stream_factory.cc ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698