| Index: net/quic/quic_packet_generator.cc
|
| diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
|
| index 12ebcfb0e5a750a01027638bc0bade9faa167749..f95180a95a8983fd80a088211fa2e2f7cb742b68 100644
|
| --- a/net/quic/quic_packet_generator.cc
|
| +++ b/net/quic/quic_packet_generator.cc
|
| @@ -151,23 +151,24 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(
|
| return QuicConsumedData(0, false);
|
| }
|
|
|
| - int frames_created = 0;
|
| while (delegate_->ShouldGeneratePacket(
|
| HAS_RETRANSMITTABLE_DATA, has_handshake ? IS_HANDSHAKE : NOT_HANDSHAKE)) {
|
| QuicFrame frame;
|
| - UniqueStreamBuffer buffer;
|
| - size_t bytes_consumed = packet_creator_.CreateStreamFrame(
|
| - id, iov, total_bytes_consumed, offset + total_bytes_consumed, fin,
|
| - &frame, &buffer);
|
| - ++frames_created;
|
| -
|
| - if (!AddFrame(frame, buffer.Pass(), has_handshake)) {
|
| - LOG(DFATAL) << "Failed to add stream frame.";
|
| + if (!packet_creator_.ConsumeData(id, iov, total_bytes_consumed,
|
| + offset + total_bytes_consumed, fin,
|
| + has_handshake, &frame)) {
|
| + LOG(DFATAL) << "Created but failed to add a stream frame.";
|
| // Inability to add a STREAM frame creates an unrecoverable hole in a
|
| // the stream, so it's best to close the connection.
|
| delegate_->CloseConnection(QUIC_INTERNAL_ERROR, false);
|
| return QuicConsumedData(0, false);
|
| }
|
| + DCHECK(frame.stream_frame);
|
| + size_t bytes_consumed = frame.stream_frame->data.length();
|
| + if (debug_delegate_ != nullptr) {
|
| + debug_delegate_->OnFrameAddedToPacket(frame);
|
| + }
|
| +
|
| if (listener != nullptr) {
|
| ack_listeners_.push_back(AckListenerWrapper(listener, bytes_consumed));
|
| }
|
|
|