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

Unified Diff: net/quic/quic_framer.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_connection_test.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer.cc
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index a04824a0684ab89a8bbeb94aa3e3990cc1f1bf6c..114f43f63e9a83c4ea7f1870a4b5a7acb578c05c 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -268,7 +268,8 @@ size_t QuicFramer::GetSerializedFrameLength(
InFecGroup is_in_fec_group,
QuicPacketNumberLength packet_number_length) {
// Prevent a rare crash reported in b/19458523.
- if (frame.stream_frame == nullptr) {
+ if ((frame.type == STREAM_FRAME || frame.type == ACK_FRAME) &&
+ frame.stream_frame == nullptr) {
LOG(DFATAL) << "Cannot compute the length of a null frame. "
<< "type:" << frame.type << "free_bytes:" << free_bytes
<< " first_frame:" << first_frame
@@ -397,7 +398,7 @@ QuicPacket* QuicFramer::BuildDataPacket(const QuicPacketHeader& header,
}
break;
case BLOCKED_FRAME:
- if (!AppendBlockedFrame(*frame.blocked_frame, &writer)) {
+ if (!AppendBlockedFrame(frame.blocked_frame, &writer)) {
LOG(DFATAL) << "AppendBlockedFrame failed";
return nullptr;
}
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698