diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-26 16:34:16 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-26 16:34:16 +0000 |
commit | 3a7b66d5ef5a33c53661b01c14721343b6c22859 (patch) | |
tree | e1f817d4a72311d20a5199b7ad9be6548112acd7 /base/test | |
parent | 42252e078e8bd3d278bc2c33e8ae593c265210fe (diff) | |
download | chromium_src-3a7b66d5ef5a33c53661b01c14721343b6c22859.zip chromium_src-3a7b66d5ef5a33c53661b01c14721343b6c22859.tar.gz chromium_src-3a7b66d5ef5a33c53661b01c14721343b6c22859.tar.bz2 |
Disallow UI/IO thread blocking on any other thread.
By design, there's no ScopedAllowWait that is reachable by all code. From experience with ScopedAllowIO, it will be abused. So instead the existing callers (which should all be fixed other than two) are friends with ThreadRestrictions.
Review URL: https://chromiumcodereview.appspot.com/10151009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test')
-rw-r--r-- | base/test/thread_test_helper.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/base/test/thread_test_helper.cc b/base/test/thread_test_helper.cc index ad240b3..a91517d 100644 --- a/base/test/thread_test_helper.cc +++ b/base/test/thread_test_helper.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/location.h" +#include "base/threading/thread_restrictions.h" namespace base { @@ -20,6 +21,7 @@ bool ThreadTestHelper::Run() { FROM_HERE, base::Bind(&ThreadTestHelper::RunInThread, this))) { return false; } + base::ThreadRestrictions::ScopedAllowWait allow_wait; done_event_.Wait(); return test_result_; } |