| Index: net/base/upload_data_stream.cc
|
| diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc
|
| index cee54c7740dadef6c804c309ee141d53843b7428..5b2e5d30b659cbf7410da85b41898ee604819fb4 100644
|
| --- a/net/base/upload_data_stream.cc
|
| +++ b/net/base/upload_data_stream.cc
|
| @@ -31,7 +31,10 @@ UploadDataStream::~UploadDataStream() {
|
| int UploadDataStream::Init() {
|
| DCHECK(!initialized_successfully_);
|
|
|
| - total_size_ = upload_data_->GetContentLength();
|
| + {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| + total_size_ = upload_data_->GetContentLengthSync();
|
| + }
|
|
|
| // If the underlying file has been changed and the expected file
|
| // modification time is set, treat it as error. Note that the expected
|
| @@ -98,6 +101,8 @@ int UploadDataStream::Read(IOBuffer* buf, int buf_len) {
|
| // Open the file of the current element if not yet opened.
|
| if (!element_file_stream_.get()) {
|
| element_file_bytes_remaining_ = element.GetContentLength();
|
| + // Temporarily allow until fix: http://crbug.com/72001.
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| element_file_stream_.reset(element.NewFileStreamForReading());
|
| }
|
|
|
|
|