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

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 1281303002: QUIC - Call base::debug::DumpWithoutCrashing instead of crashing in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/dump_without_crashing.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/stl_util.h" 11 #include "base/stl_util.h"
11 #include "net/quic/congestion_control/pacing_sender.h" 12 #include "net/quic/congestion_control/pacing_sender.h"
12 #include "net/quic/crypto/crypto_protocol.h" 13 #include "net/quic/crypto/crypto_protocol.h"
13 #include "net/quic/proto/cached_network_parameters.pb.h" 14 #include "net/quic/proto/cached_network_parameters.pb.h"
14 #include "net/quic/quic_ack_notifier_manager.h" 15 #include "net/quic/quic_ack_notifier_manager.h"
15 #include "net/quic/quic_connection_stats.h" 16 #include "net/quic/quic_connection_stats.h"
16 #include "net/quic/quic_flags.h" 17 #include "net/quic/quic_flags.h"
17 #include "net/quic/quic_utils_chromium.h" 18 #include "net/quic/quic_utils_chromium.h"
18 19
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // Only retransmit frames which are in flight, and therefore have been sent. 648 // Only retransmit frames which are in flight, and therefore have been sent.
648 if (!it->in_flight || it->retransmittable_frames == nullptr) { 649 if (!it->in_flight || it->retransmittable_frames == nullptr) {
649 continue; 650 continue;
650 } 651 }
651 if (!handshake_confirmed_) { 652 if (!handshake_confirmed_) {
652 DCHECK_NE(IS_HANDSHAKE, it->retransmittable_frames->HasCryptoHandshake()); 653 DCHECK_NE(IS_HANDSHAKE, it->retransmittable_frames->HasCryptoHandshake());
653 } 654 }
654 MarkForRetransmission(sequence_number, TLP_RETRANSMISSION); 655 MarkForRetransmission(sequence_number, TLP_RETRANSMISSION);
655 return true; 656 return true;
656 } 657 }
658 #if defined(NDEBUG)
659 base::debug::DumpWithoutCrashing();
660 #else
657 DLOG(FATAL) 661 DLOG(FATAL)
658 << "No retransmittable packets, so RetransmitOldestPacket failed."; 662 << "No retransmittable packets, so RetransmitOldestPacket failed.";
663 #endif
659 return false; 664 return false;
660 } 665 }
661 666
662 void QuicSentPacketManager::RetransmitRtoPackets() { 667 void QuicSentPacketManager::RetransmitRtoPackets() {
663 LOG_IF(DFATAL, pending_timer_transmission_count_ > 0) 668 LOG_IF(DFATAL, pending_timer_transmission_count_ > 0)
664 << "Retransmissions already queued:" << pending_timer_transmission_count_; 669 << "Retransmissions already queued:" << pending_timer_transmission_count_;
665 // Mark two packets for retransmission. 670 // Mark two packets for retransmission.
666 QuicPacketSequenceNumber sequence_number = unacked_packets_.GetLeastUnacked(); 671 QuicPacketSequenceNumber sequence_number = unacked_packets_.GetLeastUnacked();
667 for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin(); 672 for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin();
668 it != unacked_packets_.end(); ++it, ++sequence_number) { 673 it != unacked_packets_.end(); ++it, ++sequence_number) {
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as 944 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as
940 // the default granularity of the Linux kernel's FQ qdisc. 945 // the default granularity of the Linux kernel's FQ qdisc.
941 using_pacing_ = true; 946 using_pacing_ = true;
942 send_algorithm_.reset( 947 send_algorithm_.reset(
943 new PacingSender(send_algorithm_.release(), 948 new PacingSender(send_algorithm_.release(),
944 QuicTime::Delta::FromMilliseconds(1), 949 QuicTime::Delta::FromMilliseconds(1),
945 kInitialUnpacedBurst)); 950 kInitialUnpacedBurst));
946 } 951 }
947 952
948 } // namespace net 953 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698