Remove a DCHECK on ClientSocketHandle state from proxy code.
This was causing issues for one of our fuzzers. The DCHECK made sure the ClientSocketHandle was initialized, which was not the state in tests. Normally, handles set initialized to true when they are assigned a socket, and the connection callback is invoked. When the Handle is torn down, if the Handle was initialized, the socket is returned to the socket pool. A lot of tests bypass all this, not using socket pools at all, and just assigning a socket to the SocketHandle. This results in is_connected being false, which was triggering the DCHECK. We could instead make sure that is_initialized is set to true in tests, but this has minimal value - in production, it's set to true if and only if a socket is set and the callback invoked, and set to false only when the socket is destroyed or returned to the socket pool. If the socket is null, we'll crash very soon with an equally useful crash stack, anyways. In production, if the connection callback wasn't invoked, the HttpProxyClientSocket's state machine will catch the issue, anyways. BUG=632608 Review-Url: https://codereview.chromium.org/2192193002 Cr-Commit-Position: refs/heads/master@{#408670}
Showing
Please register or sign in to comment