Index: net/http/http_server_properties_impl.cc |
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc |
index 525ae641c09767a4f0356411b68cf963d5a58f00..9cda89fb093b89bd603448e0982595fa9a402127 100644 |
--- a/net/http/http_server_properties_impl.cc |
+++ b/net/http/http_server_properties_impl.cc |
@@ -53,10 +53,10 @@ void HttpServerPropertiesImpl::InitializeAlternateProtocolServers( |
// Keep all the broken ones since those don't get persisted. |
for (AlternateProtocolMap::iterator it = alternate_protocol_map_.begin(); |
it != alternate_protocol_map_.end();) { |
- AlternateProtocolMap::iterator old_it = it; |
- ++it; |
- if (!old_it->second.is_broken) { |
- alternate_protocol_map_.Erase(old_it); |
+ if (it->second.is_broken) { |
+ ++it; |
+ } else { |
+ it = alternate_protocol_map_.Erase(it); |
} |
} |