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

Unified Diff: net/base/upload_data_stream.cc

Issue 9316048: net: Explicitly close a file stream in UploadDataStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_data_stream.cc
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc
index 2d2a3a56fab3c48080cb6bb0de2cd2d57bbb76bb..c777c5eca056bd6a83589971c1ce01f81bf99dfa 100644
--- a/net/base/upload_data_stream.cc
+++ b/net/base/upload_data_stream.cc
@@ -165,7 +165,12 @@ void UploadDataStream::AdvanceToNextElement() {
++element_index_;
element_offset_ = 0;
element_file_bytes_remaining_ = 0;
- element_file_stream_.reset();
+ if (element_file_stream_.get()) {
+ // Temporarily allow until fix: http://crbug.com/72001.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ element_file_stream_.Close();
eroman 2012/02/01 21:43:28 The call to Close() isn't strictly necessary right
satorux1 2012/02/01 21:46:09 you are right, but wanted to make it clear that fi
+ element_file_stream_.reset();
+ }
}
bool UploadDataStream::IsEOF() const {
« 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