| Index: net/quic/quic_packet_creator.cc
|
| diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
|
| index 233fa9db17d947ccc92fa83959f2aa74967074f0..68f90ca7ae340920e96225fda30a3b4ad0d9040a 100644
|
| --- a/net/quic/quic_packet_creator.cc
|
| +++ b/net/quic/quic_packet_creator.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "net/quic/crypto/quic_random.h"
|
| +#include "net/quic/quic_bug_tracker.h"
|
| #include "net/quic/quic_data_writer.h"
|
| #include "net/quic/quic_fec_group.h"
|
| #include "net/quic/quic_flags.h"
|
| @@ -175,7 +176,7 @@ bool QuicPacketCreator::IsFecGroupOpen() const {
|
|
|
| void QuicPacketCreator::StartFecProtectingPackets() {
|
| if (max_packets_per_fec_group_ == 0) {
|
| - LOG(DFATAL) << "Cannot start FEC protection when FEC is not enabled.";
|
| + QUIC_BUG << "Cannot start FEC protection when FEC is not enabled.";
|
| return;
|
| }
|
| // TODO(jri): This currently requires that the generator flush out any
|
| @@ -184,7 +185,7 @@ void QuicPacketCreator::StartFecProtectingPackets() {
|
| // generator to check if the resulting expansion still allows the incoming
|
| // frame to be added to the packet.
|
| if (HasPendingFrames()) {
|
| - LOG(DFATAL) << "Cannot start FEC protection with pending frames.";
|
| + QUIC_BUG << "Cannot start FEC protection with pending frames.";
|
| return;
|
| }
|
| DCHECK(!fec_protect_);
|
| @@ -193,7 +194,7 @@ void QuicPacketCreator::StartFecProtectingPackets() {
|
|
|
| void QuicPacketCreator::StopFecProtectingPackets() {
|
| if (fec_group_.get() != nullptr) {
|
| - LOG(DFATAL) << "Cannot stop FEC protection with open FEC group.";
|
| + QUIC_BUG << "Cannot stop FEC protection with open FEC group.";
|
| return;
|
| }
|
| DCHECK(fec_protect_);
|
| @@ -465,8 +466,9 @@ void QuicPacketCreator::Flush() {
|
|
|
| void QuicPacketCreator::OnSerializedPacket(SerializedPacket* packet) {
|
| if (packet->packet == nullptr) {
|
| - LOG(DFATAL) << "Failed to SerializePacket. fec_policy:" << fec_send_policy()
|
| - << " should_fec_protect_:" << should_fec_protect_next_packet_;
|
| +
|
| + QUIC_BUG << "Failed to SerializePacket. fec_policy:" << fec_send_policy()
|
| + << " should_fec_protect_:" << should_fec_protect_next_packet_;
|
| delegate_->CloseConnection(QUIC_FAILED_TO_SERIALIZE_PACKET, false);
|
| return;
|
| }
|
| @@ -574,8 +576,7 @@ SerializedPacket QuicPacketCreator::SerializePacket(
|
| size_t length = framer_->BuildDataPacket(header, queued_frames_,
|
| encrypted_buffer, packet_size_);
|
| if (length == 0) {
|
| - LOG(DFATAL) << "Failed to serialize " << queued_frames_.size()
|
| - << " frames.";
|
| + QUIC_BUG << "Failed to serialize " << queued_frames_.size() << " frames.";
|
| return NoPacket();
|
| }
|
|
|
| @@ -607,8 +608,7 @@ SerializedPacket QuicPacketCreator::SerializePacket(
|
| size_t length =
|
| framer_->BuildDataPacket(header, queued_frames_, buffer, packet_size_);
|
| if (length == 0) {
|
| - LOG(DFATAL) << "Failed to serialize " << queued_frames_.size()
|
| - << " frames.";
|
| + QUIC_BUG << "Failed to serialize " << queued_frames_.size() << " frames.";
|
| return NoPacket();
|
| }
|
|
|
| @@ -633,7 +633,7 @@ SerializedPacket QuicPacketCreator::SerializePacket(
|
| encrypted_buffer, encrypted_buffer_len);
|
| }
|
| if (encrypted_length == 0) {
|
| - LOG(DFATAL) << "Failed to encrypt packet number " << packet_number_;
|
| + QUIC_BUG << "Failed to encrypt packet number " << packet_number_;
|
| return NoPacket();
|
| }
|
|
|
| @@ -661,7 +661,7 @@ SerializedPacket QuicPacketCreator::SerializeFec(char* buffer,
|
| size_t buffer_len) {
|
| DCHECK_LT(0u, buffer_len);
|
| if (fec_group_.get() == nullptr || fec_group_->NumReceivedPackets() <= 0) {
|
| - LOG(DFATAL) << "SerializeFEC called but no group or zero packets in group.";
|
| + QUIC_BUG << "SerializeFEC called but no group or zero packets in group.";
|
| // TODO(jri): Make this a public method of framer?
|
| return NoPacket();
|
| }
|
| @@ -681,7 +681,7 @@ SerializedPacket QuicPacketCreator::SerializeFec(char* buffer,
|
| size_t encrypted_length = framer_->EncryptPayload(
|
| encryption_level_, packet_number_, *packet, buffer, buffer_len);
|
| if (encrypted_length == 0) {
|
| - LOG(DFATAL) << "Failed to encrypt packet number " << packet_number_;
|
| + QUIC_BUG << "Failed to encrypt packet number " << packet_number_;
|
| return NoPacket();
|
| }
|
| SerializedPacket serialized(current_path_, header.packet_number,
|
| @@ -741,7 +741,7 @@ bool QuicPacketCreator::AddFrame(const QuicFrame& frame,
|
| if (FLAGS_quic_never_write_unencrypted_data && frame.type == STREAM_FRAME &&
|
| frame.stream_frame->stream_id != kCryptoStreamId &&
|
| encryption_level_ == ENCRYPTION_NONE) {
|
| - LOG(DFATAL) << "Cannot send stream data without encryption.";
|
| + QUIC_BUG << "Cannot send stream data without encryption.";
|
| delegate_->CloseConnection(QUIC_UNENCRYPTED_STREAM_DATA, false);
|
| return false;
|
| }
|
| @@ -860,8 +860,7 @@ void QuicPacketCreator::SetCurrentPath(
|
| }
|
|
|
| if (HasPendingFrames()) {
|
| - LOG(DFATAL)
|
| - << "Unable to change paths when a packet is under construction.";
|
| + QUIC_BUG << "Unable to change paths when a packet is under construction.";
|
| return;
|
| }
|
|
|
|
|