Index: components/cronet/android/url_request_adapter.cc |
diff --git a/components/cronet/android/url_request_adapter.cc b/components/cronet/android/url_request_adapter.cc |
index 8b2df90773dc35ff4143381d5f13b9132d908b38..b91f055cbf43749e5985aa1263b88b84d946d729 100644 |
--- a/components/cronet/android/url_request_adapter.cc |
+++ b/components/cronet/android/url_request_adapter.cc |
@@ -126,6 +126,10 @@ void URLRequestAdapter::Start() { |
void URLRequestAdapter::OnAppendChunk(const scoped_ptr<char[]> bytes, |
int bytes_len, bool is_last_chunk) { |
DCHECK(OnNetworkThread()); |
+ // Request could have completed and got destroyed on the network thread |
mmenke
2014/11/19 18:50:51
got -> been
mef
2014/11/19 19:32:36
Done.
|
+ // while appendChunk was posting task from application thread. |
mmenke
2014/11/19 18:50:51
nit: posting the task from an application thread.
mef
2014/11/19 19:32:36
Done.
|
+ if (!url_request_) |
+ return; |
url_request_->AppendChunkToUpload(bytes.get(), bytes_len, is_last_chunk); |
} |