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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 1181573003: Set error on WebDataConsumerHandle while loading body. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-ipc-data-consumer
Patch Set: Created 5 years, 6 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 | « content/child/shared_memory_data_consumer_handle_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 54ad06e9a300ff3e369259ea6758138ab0bdfeb3..65086cf956bda35d3334a79953108ac9f87314f4 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -362,6 +362,9 @@ void WebURLLoaderImpl::Context::Cancel() {
request_id_ = -1;
}
+ if (body_stream_writer_)
+ body_stream_writer_->Fail();
+
// Ensure that we do not notify the multipart delegate anymore as it has
// its own pointer to the client.
if (multipart_delegate_)
@@ -728,10 +731,9 @@ void WebURLLoaderImpl::Context::OnCompletedRequest(
multipart_delegate_.reset(NULL);
}
- if (request_.useStreamOnResponse()) {
- // TODO(yhirano): Notify error.
- body_stream_writer_.reset();
- }
+ if (body_stream_writer_ && error_code != net::OK)
+ body_stream_writer_->Fail();
+ body_stream_writer_.reset();
if (client_) {
if (error_code != net::OK) {
« no previous file with comments | « content/child/shared_memory_data_consumer_handle_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698