Fix ResumableTCPSocket destruction.
ResumableTCPSocket sets a read_callback_ that points to TCPSocketEventDispatcher::ReadCallback. This callback gets called from ~TCPSocket, when ~ResumableTCPSocket already completed, and it calls ResumableTCPSocket methods (which are already illegal to call). The fix just calls Disconnect from ~ResumableTCPSocket which clears the callback and all the state that relies on ResumableTCPSocket members. This fixes a bug found with UBSan Vptr. BUG=617199 Review-Url: https://codereview.chromium.org/2034233002 Cr-Commit-Position: refs/heads/master@{#397829}
Showing
Please register or sign in to comment