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

Unified Diff: net/quic/quic_packet_generator.cc

Issue 1399893005: relnote: Inline all frames smaller than a pointer into QuicFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Avoid_redundant_recvmmsg_104327020
Patch Set: Created 5 years, 2 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_packet_creator_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.cc
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index eed8ec7d84d62b14f59761158c65795494400146..ea50719f0a29a5edeb931baeeb5659c0da0c5ea5 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -57,7 +57,9 @@ QuicPacketGenerator::~QuicPacketGenerator() {
for (QuicFrame& frame : queued_control_frames_) {
switch (frame.type) {
case PADDING_FRAME:
- delete frame.padding_frame;
+ case MTU_DISCOVERY_FRAME:
+ case PING_FRAME:
+ case BLOCKED_FRAME:
break;
case STREAM_FRAME:
delete frame.stream_frame;
@@ -65,9 +67,6 @@ QuicPacketGenerator::~QuicPacketGenerator() {
case ACK_FRAME:
delete frame.ack_frame;
break;
- case MTU_DISCOVERY_FRAME:
- delete frame.mtu_discovery_frame;
- break;
case RST_STREAM_FRAME:
delete frame.rst_stream_frame;
break;
@@ -80,15 +79,9 @@ QuicPacketGenerator::~QuicPacketGenerator() {
case WINDOW_UPDATE_FRAME:
delete frame.window_update_frame;
break;
- case BLOCKED_FRAME:
- delete frame.blocked_frame;
- break;
case STOP_WAITING_FRAME:
delete frame.stop_waiting_frame;
break;
- case PING_FRAME:
- delete frame.ping_frame;
- break;
case NUM_FRAME_TYPES:
DCHECK(false) << "Cannot delete type: " << frame.type;
}
@@ -250,7 +243,7 @@ void QuicPacketGenerator::GenerateMtuDiscoveryPacket(
// The MTU discovery frame is allocated on the stack, since it is going to be
// serialized within this function.
QuicMtuDiscoveryFrame mtu_discovery_frame;
- QuicFrame frame(&mtu_discovery_frame);
+ QuicFrame frame(mtu_discovery_frame);
// Send the probe packet with the new length.
SetMaxPacketLength(target_mtu, /*force=*/true);
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698