| Index: chrome/browser/debugger/devtools_http_protocol_handler.cc
|
| diff --git a/chrome/browser/debugger/devtools_http_protocol_handler.cc b/chrome/browser/debugger/devtools_http_protocol_handler.cc
|
| index 9f239458a261b8c78dad3c1c8d19d7440262e644..1aaf18be6aae23c67708d7eaafb94831199d6837 100644
|
| --- a/chrome/browser/debugger/devtools_http_protocol_handler.cc
|
| +++ b/chrome/browser/debugger/devtools_http_protocol_handler.cc
|
| @@ -263,13 +263,13 @@ void DevToolsHttpProtocolHandler::OnWebSocketMessageUI(
|
|
|
| void DevToolsHttpProtocolHandler::OnCloseUI(HttpListenSocket* socket) {
|
| SocketToClientHostMap::iterator it = socket_to_client_host_ui_.find(socket);
|
| - if (it == socket_to_client_host_ui_.end())
|
| - return;
|
| - DevToolsClientHostImpl* client_host =
|
| - static_cast<DevToolsClientHostImpl*>(it->second);
|
| - client_host->NotifyCloseListener();
|
| - delete client_host;
|
| - socket_to_client_host_ui_.erase(socket);
|
| + if (it != socket_to_client_host_ui_.end()) {
|
| + DevToolsClientHostImpl* client_host =
|
| + static_cast<DevToolsClientHostImpl*>(it->second);
|
| + client_host->NotifyCloseListener();
|
| + delete client_host;
|
| + socket_to_client_host_ui_.erase(socket);
|
| + }
|
|
|
| // We are holding last reference to scoped refptr 'socket' here.
|
| // We can't exit method just like that since 'socket' is going to
|
|
|