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

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: uploading the right version... 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..8c94e08c2ee68c9ad297a1e6be41801d6a2cd68b 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();
+ 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