summaryrefslogtreecommitdiffstats
path: root/webkit/blob
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-10 21:57:51 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-10 21:57:51 +0000
commit7d01ba27a7511698989bf018c5d8979d5942b13b (patch)
tree12e789e0e964dcd9088603679f22d4d4ed3be169 /webkit/blob
parent776f4d5929bcbed04e75ff1390e4e930a1980c71 (diff)
downloadchromium_src-7d01ba27a7511698989bf018c5d8979d5942b13b.zip
chromium_src-7d01ba27a7511698989bf018c5d8979d5942b13b.tar.gz
chromium_src-7d01ba27a7511698989bf018c5d8979d5942b13b.tar.bz2
Re-enable FileWriterSync ui_tests by adding a ScopedAllowIO to BlobURLRequestJob.
BUG=75548 TEST=ui_tests Review URL: http://codereview.chromium.org/6666001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r--webkit/blob/blob_url_request_job.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc
index 9f78e66..58e96c6 100644
--- a/webkit/blob/blob_url_request_job.cc
+++ b/webkit/blob/blob_url_request_job.cc
@@ -11,6 +11,7 @@
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
#include "base/string_number_conversions.h"
+#include "base/threading/thread_restrictions.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
@@ -313,6 +314,9 @@ bool BlobURLRequestJob::ReadFile(const BlobData::Item& item,
// Open the file if not yet.
if (!stream_.IsOpen()) {
+ // stream_.Open() and stream_.Seek() block the IO thread.
+ // See http://crbug.com/75548.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
int rv = stream_.Open(item.file_path(), base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_READ | base::PLATFORM_FILE_ASYNC);
if (rv != net::OK) {