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

Unified Diff: net/socket/client_socket_pool_base.cc

Issue 1030373002: Replace a CHECK in the socket pool code with a NOTREACHED(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base.cc
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 628fdd0d9e695b511c3a50e2d1e1867d67cc588f..f9a8b4df1cea4c36f4a4bf2555984d35b1b7b6e2 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -563,11 +563,15 @@ LoadState ClientSocketPoolBaseHelper::GetLoadState(
return LOAD_STATE_CONNECTING;
GroupMap::const_iterator group_it = group_map_.find(group_name);
- // TODO(mmenke): Switch to DCHECK once sure this doesn't break anything.
- // Added in M43.
- CHECK(group_it != group_map_.end());
- const Group& group = *group_it->second;
+ if (group_it == group_map_.end()) {
+ // TODO(mmenke): This is actually reachec in the wild, for unknown reasons.
eroman 2015/03/27 19:51:02 reached
mmenke 2015/03/27 19:59:27 Done.
+ // Would be great to understand why, and if it's a bug, fix it. If not,
+ // should have a test for that case.
+ NOTREACHED();
+ return LOAD_STATE_IDLE;
+ }
+ const Group& group = *group_it->second;
if (group.HasConnectJobForHandle(handle)) {
// Just return the state of the farthest along ConnectJob for the first
// group.jobs().size() pending requests.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698