Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: net/url_request/url_fetcher_core.cc

Issue 46573008: Fix a crash in URLFetcherCore by handling a case where |request_| is NULL (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_fetcher_core.cc
diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc
index bd28b4b0161af2c205a3c2cd1766fbc15ef5ab3d..ab0f37911b75c48097aff500afa3e290a1dad87a 100644
--- a/net/url_request/url_fetcher_core.cc
+++ b/net/url_request/url_fetcher_core.cc
@@ -826,9 +826,11 @@ void URLFetcherCore::DidWriteBuffer(scoped_refptr<DrainableIOBuffer> data,
if (WriteBuffer(data) < 0)
return;
- // Finished writing buffer_. Read some more.
+ // Finished writing buffer_. Read some more, unless the request has been
+ // cancelled and deleted.
DCHECK_EQ(0, data->BytesRemaining());
- ReadResponse();
+ if (request_.get())
+ ReadResponse();
}
void URLFetcherCore::ReadResponse() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698