diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 00:05:47 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 00:05:47 +0000 |
commit | a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110 (patch) | |
tree | e612561599b102cccd1bc6a7165c3ff7d192f0c8 /chrome/browser/spellcheck_host.cc | |
parent | c9310561dcb25c863beaf7b76e8da89bd14fd757 (diff) | |
download | chromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.zip chromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.tar.gz chromium_src-a8e4b5a8779bed7cb5afcfb7d28cf75486a0b110.tar.bz2 |
ThreadRestrictions: disallow blocking IO on the UI thread
This patch sets the "disallow IO" flag after the UI thread has
started, and then whitelists in the many places where we're
accidentally doing IO from the UI thread. (I've filed bugs
on all of those cases.)
BUG=59847,60630,60641,60211,60634,60643,24163,60825
Review URL: http://codereview.chromium.org/4146004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellcheck_host.cc')
-rw-r--r-- | chrome/browser/spellcheck_host.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/spellcheck_host.cc b/chrome/browser/spellcheck_host.cc index 545eaaa..d9784c2 100644 --- a/chrome/browser/spellcheck_host.cc +++ b/chrome/browser/spellcheck_host.cc @@ -11,6 +11,7 @@ #include "base/logging.h" #include "base/path_service.h" #include "base/string_split.h" +#include "base/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "chrome/browser/prefs/pref_member.h" #include "chrome/browser/profile.h" @@ -28,7 +29,13 @@ namespace { FilePath GetFirstChoiceFilePath(const std::string& language) { FilePath dict_dir; - PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); + { + // This should not do blocking IO from the UI thread! + // Temporarily allow it for now. + // http://code.google.com/p/chromium/issues/detail?id=60643 + base::ThreadRestrictions::ScopedAllowIO allow_io; + PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); + } return SpellCheckCommon::GetVersionedFileName(language, dict_dir); } |