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

Unified Diff: net/http/http_basic_stream.cc

Issue 2619583002: Clean up HttpStreamFactoryImpl::JobController when Impl::Jobs complete (Closed)
Patch Set: address wez@ comment Created 3 years, 11 months 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 | net/http/http_stream_factory_impl_job_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_basic_stream.cc
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc
index c805d7cf9892f4dbff4daf49cbdcb4525243cdb9..312b927851b3d9f1f6d122c1e5e5ed973f0d9810 100644
--- a/net/http/http_basic_stream.cc
+++ b/net/http/http_basic_stream.cc
@@ -49,7 +49,11 @@ int HttpBasicStream::ReadResponseBody(IOBuffer* buf,
}
void HttpBasicStream::Close(bool not_reusable) {
- parser()->Close(not_reusable);
+ // parser() is null if |this| is created by an orphaned
+ // HttpStreamFactoryImpl::Job in which case InitializeStream() will not have
+ // been called.
+ if (parser())
+ parser()->Close(not_reusable);
}
HttpStream* HttpBasicStream::RenewStreamForAuth() {
« no previous file with comments | « no previous file | net/http/http_stream_factory_impl_job_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698