diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 22:41:51 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 22:41:51 +0000 |
commit | 88328f582694565b00ea445c4541f37fa73f3539 (patch) | |
tree | 49f8d1db6ef50042e88e8fbde68bddc3663b6565 /chrome/browser/service | |
parent | 2c40ca906d025d38855eac463c17cb8e9b7b412e (diff) | |
download | chromium_src-88328f582694565b00ea445c4541f37fa73f3539.zip chromium_src-88328f582694565b00ea445c4541f37fa73f3539.tar.gz chromium_src-88328f582694565b00ea445c4541f37fa73f3539.tar.bz2 |
Thread IO safety: annotate file_util, and block IO thread from doing IO
- Mark functions in file_util_posix as requiring permission to perform
disk actions.
- Mark the IO thread as disallowed from performing disk actions.
- Temporarily work around the protections in places where we currently
have bugs.
BUG=59847,59849,60207,60211
TEST=no dchecks in debug builds
Review URL: http://codereview.chromium.org/3872002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/service')
-rw-r--r-- | chrome/browser/service/service_process_control.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc index 534cc5a..6a41395 100644 --- a/chrome/browser/service/service_process_control.cc +++ b/chrome/browser/service/service_process_control.cc @@ -9,6 +9,7 @@ #include "base/process_util.h" #include "base/stl_util-inl.h" #include "base/thread.h" +#include "base/thread_restrictions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/io_thread.h" @@ -55,7 +56,14 @@ class ServiceProcessControl::Launcher void DoDetectLaunched(Task* task) { const uint32 kMaxLaunchDetectRetries = 10; - launched_ = CheckServiceProcessReady(); + { + // We should not be doing blocking disk IO from this thread! + // Temporarily allowed until we fix + // http://code.google.com/p/chromium/issues/detail?id=60207 + base::ThreadRestrictions::ScopedAllowIO allow_io; + launched_ = CheckServiceProcessReady(); + } + if (launched_ || (retry_count_ >= kMaxLaunchDetectRetries)) { BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, NewRunnableMethod(this, &Launcher::Notify, task)); |