Commit f2bd2b6e authored by satorux@chromium.org's avatar satorux@chromium.org

net: Explicitly close a file stream in UploadDataStream.

This is to make it clear that a file stream is closed there,
hence file access is performed. Add ScopedIOAllowIO as well.

BUG=72001
TEST=net_unittests


Review URL: http://codereview.chromium.org/9316048

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120134 0039d316-1c4b-4281-b951-d872f2087c98
parent 467f4ba7
...@@ -165,7 +165,12 @@ void UploadDataStream::AdvanceToNextElement() { ...@@ -165,7 +165,12 @@ void UploadDataStream::AdvanceToNextElement() {
++element_index_; ++element_index_;
element_offset_ = 0; element_offset_ = 0;
element_file_bytes_remaining_ = 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 { bool UploadDataStream::IsEOF() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment