Fix crash if a pending request is continued after deletion (see issue #2622).

This is a speculative fix for a crash where the pending ResourceRequest appears
to be invalid after the request is continued from SetInitialized.
This commit is contained in:
Marshall Greenblatt
2019-06-19 15:45:23 +02:00
parent ba08c21517
commit b03a419c6b
2 changed files with 16 additions and 1 deletions

View File

@@ -875,6 +875,9 @@ void InterceptedRequest::ContinueToResponseStarted(int error_code) {
}
void InterceptedRequest::OnDestroy() {
// We don't want any callbacks after this point.
weak_factory_.InvalidateWeakPtrs();
factory_->request_handler_->OnRequestComplete(id_, request_, status_);
// Destroys |this|.