diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-19 20:34:18 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-19 20:34:18 +0000 |
commit | 359d2bf31d2edc43a9ca8b08ee07707038efce09 (patch) | |
tree | 10bf00aa3964c73a37bae063a349bd496010ed4b /base/message_loop_proxy_impl.cc | |
parent | 1da05ebbe6301142de46ef7cb100b6cc5aaa38c2 (diff) | |
download | chromium_src-359d2bf31d2edc43a9ca8b08ee07707038efce09.zip chromium_src-359d2bf31d2edc43a9ca8b08ee07707038efce09.tar.gz chromium_src-359d2bf31d2edc43a9ca8b08ee07707038efce09.tar.bz2 |
Reland 66791 (change was innocent)
Revert 66719 - Reland r65996. Disallows Singletons on non-joinable thread.
Test breakages caused by this change have been fixed here or in other changelists.
BUG=61753
TEST=none
Review URL: http://codereview.chromium.org/5024003
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/5206005
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/5242002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop_proxy_impl.cc')
-rw-r--r-- | base/message_loop_proxy_impl.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/base/message_loop_proxy_impl.cc b/base/message_loop_proxy_impl.cc index 2e0f809..7998a94 100644 --- a/base/message_loop_proxy_impl.cc +++ b/base/message_loop_proxy_impl.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/message_loop_proxy_impl.h" +#include "base/thread_restrictions.h" namespace base { @@ -45,6 +46,11 @@ bool MessageLoopProxyImpl::PostNonNestableDelayedTask( } bool MessageLoopProxyImpl::BelongsToCurrentThread() { + // We shouldn't use MessageLoop::current() since it uses LazyInstance which + // may be deleted by ~AtExitManager when a WorkerPool thread calls this + // function. + // http://crbug.com/63678 + base::ThreadRestrictions::ScopedAllowSingleton allow_singleton; AutoLock lock(message_loop_lock_); return (target_message_loop_ && (MessageLoop::current() == target_message_loop_)); @@ -98,4 +104,3 @@ MessageLoopProxy::CreateForCurrentThread() { } } // namespace base - |