From 7d01ba27a7511698989bf018c5d8979d5942b13b Mon Sep 17 00:00:00 2001 From: "adamk@chromium.org" Date: Thu, 10 Mar 2011 21:57:51 +0000 Subject: 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 --- webkit/blob/blob_url_request_job.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'webkit/blob') 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) { -- cgit v1.1