diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-10 22:24:53 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-10 22:24:53 +0000 |
commit | a40e548394014c8679c269fb936a57e68e632080 (patch) | |
tree | 9ecab63f54ba8ce7be569da87b2d364f48dca391 /chrome/browser/geolocation | |
parent | aebe23a3cd89181c929618093ec8a0fefb4b4f11 (diff) | |
download | chromium_src-a40e548394014c8679c269fb936a57e68e632080.zip chromium_src-a40e548394014c8679c269fb936a57e68e632080.tar.gz chromium_src-a40e548394014c8679c269fb936a57e68e632080.tar.bz2 |
Consider PlatformThread::Join() to be blocking IO.
Marks PlatformThread::Join() as blocking IO using ThreadRestrictions.
Whitelists existing spots where we join on the UI/IO threads.
Also noteworthy is I allow blocking IO on shutdown.
BUG=65530,66077,66082
TEST=none
Review URL: http://codereview.chromium.org/5693003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation')
-rw-r--r-- | chrome/browser/geolocation/geolocation_provider.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/geolocation/geolocation_provider.cc b/chrome/browser/geolocation/geolocation_provider.cc index 97e9049..3756af7 100644 --- a/chrome/browser/geolocation/geolocation_provider.cc +++ b/chrome/browser/geolocation/geolocation_provider.cc @@ -5,6 +5,7 @@ #include "chrome/browser/geolocation/geolocation_provider.h" #include "base/singleton.h" +#include "base/thread_restrictions.h" #include "chrome/browser/geolocation/location_arbitrator.h" // This class is guaranteed to outlive its internal thread, so ref counting @@ -47,6 +48,10 @@ bool GeolocationProvider::RemoveObserver(GeolocationObserver* observer) { void GeolocationProvider::OnObserversChanged() { DCHECK(OnClientThread()); if (observers_.empty()) { + // http://crbug.com/66077: This is a bug. The geolocation thread may + // transitively (via other threads it joins) block on long-running tasks / + // IO. + base::ThreadRestrictions::ScopedAllowIO allow_io; Stop(); } else { if (!IsRunning()) { |