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

Unified Diff: net/spdy/spdy_session.cc

Issue 2669263002: Add missing case in MapFramerErrorToNetError (SpdyFramer::SPDY_OVERSIZED_PAYLOAD) (Closed)
Patch Set: Apply feedback, to make the compiler catch it in the future. Created 3 years, 11 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 | « no previous file | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index a7287cdecf96f9740a1e0e9f89c7f8de61049758..6e80d24d575debab3e3bcc82063bbd3578a0c1f8 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -406,10 +406,10 @@ SpdyProtocolErrorDetails MapFramerErrorToProtocolError(
return SPDY_ERROR_INVALID_CONTROL_FRAME_SIZE;
case SpdyFramer::SPDY_OVERSIZED_PAYLOAD:
return SPDY_ERROR_OVERSIZED_PAYLOAD;
- default:
+ case SpdyFramer::LAST_ERROR:
NOTREACHED();
- return static_cast<SpdyProtocolErrorDetails>(-1);
}
+ return static_cast<SpdyProtocolErrorDetails>(-1);
Bence 2017/02/02 23:19:12 Did you not want to add NOTREACHED() right above t
}
Error MapFramerErrorToNetError(SpdyFramer::SpdyFramerError err) {
@@ -446,10 +446,12 @@ Error MapFramerErrorToNetError(SpdyFramer::SpdyFramerError err) {
return ERR_SPDY_FRAME_SIZE_ERROR;
case SpdyFramer::SPDY_INVALID_STREAM_ID:
return ERR_SPDY_PROTOCOL_ERROR;
- default:
+ case SpdyFramer::SPDY_OVERSIZED_PAYLOAD:
+ return ERR_SPDY_FRAME_SIZE_ERROR;
+ case SpdyFramer::LAST_ERROR:
NOTREACHED();
- return ERR_SPDY_PROTOCOL_ERROR;
}
+ return ERR_SPDY_PROTOCOL_ERROR;
}
SpdyProtocolErrorDetails MapRstStreamStatusToProtocolError(
@@ -483,10 +485,10 @@ SpdyProtocolErrorDetails MapRstStreamStatusToProtocolError(
return STATUS_CODE_INADEQUATE_SECURITY;
case RST_STREAM_HTTP_1_1_REQUIRED:
return STATUS_CODE_HTTP_1_1_REQUIRED;
- default:
+ case RST_STREAM_NUM_STATUS_CODES:
NOTREACHED();
- return static_cast<SpdyProtocolErrorDetails>(-1);
}
+ return static_cast<SpdyProtocolErrorDetails>(-1);
}
SpdyGoAwayStatus MapNetErrorToGoAwayStatus(Error err) {
« no previous file with comments | « no previous file | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698