diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 22:42:14 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 22:42:14 +0000 |
commit | db23c96e6b747f33b45aaed4b2963f042a5a69ad (patch) | |
tree | 2d8db8a4936ef4af34fda006beb0aff89927fdcf /base/message_loop_proxy_impl.cc | |
parent | d8a80d6e6d787b0f924e54993fd3bb700ea220fb (diff) | |
download | chromium_src-db23c96e6b747f33b45aaed4b2963f042a5a69ad.zip chromium_src-db23c96e6b747f33b45aaed4b2963f042a5a69ad.tar.gz chromium_src-db23c96e6b747f33b45aaed4b2963f042a5a69ad.tar.bz2 |
Fix shutdown crash in CertVerifier by using a MessageLoopProxy.
The CertVerifier is not getting Cancel()'d because something which owns it is getting leaked, most likely a URLRequestJob. Therefore, we can end up accessing a deleted MessageLoop on shutdown. MessageLoopProxy prevents accessing a deleted MessageLoop on shutdown, instead it just deletes the task, which isn't great, but it's better than crashing. We should fix the root cause eventually, which is a leak of the URLRequestJob.
BUG=42275,chromium-os:8179
TEST=none
Review URL: http://codereview.chromium.org/5347001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop_proxy_impl.cc')
-rw-r--r-- | base/message_loop_proxy_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/message_loop_proxy_impl.cc b/base/message_loop_proxy_impl.cc index 7998a94..c0619aa 100644 --- a/base/message_loop_proxy_impl.cc +++ b/base/message_loop_proxy_impl.cc @@ -78,6 +78,11 @@ bool MessageLoopProxyImpl::PostTaskHelper( } void MessageLoopProxyImpl::OnDestruct() const { + // 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; bool delete_later = false; { AutoLock lock(message_loop_lock_); |