diff options
author | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-29 17:46:09 +0000 |
---|---|---|
committer | joth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-29 17:46:09 +0000 |
commit | eb3846081b24c13ac270f38c4cc7828f0b560d38 (patch) | |
tree | ce686d1fbe1f11e6f9cb30a12e841f10c8ba0688 | |
parent | 35369b5ca196da383b9945926bc531b129b86252 (diff) | |
download | chromium_src-eb3846081b24c13ac270f38c4cc7828f0b560d38.zip chromium_src-eb3846081b24c13ac270f38c4cc7828f0b560d38.tar.gz chromium_src-eb3846081b24c13ac270f38c4cc7828f0b560d38.tar.bz2 |
Fix crash: geolocation arbitrator may get deleted on wrong thread.
No need for permission context to hold scoped ref to the arbitrator, so I remvoed it.
(Note this fix still reveals bug https://bugs.webkit.org/show_bug.cgi?id=36535)
BUG=39405
TEST=open page with 2 embedded frames using geolocaiton, answer infobar prompts out of order. Should not crash
Review URL: http://codereview.chromium.org/1542002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42957 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/geolocation/geolocation_permission_context.cc | 4 | ||||
-rw-r--r-- | chrome/browser/geolocation/geolocation_permission_context.h | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc index e812e00..5ff17c0 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.cc +++ b/chrome/browser/geolocation/geolocation_permission_context.cc @@ -176,9 +176,7 @@ GeolocationArbitrator* GeolocationPermissionContext::StartUpdatingRequested( DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); // TODO(joth): Use requesting_frame parameter to short-circuit the latched // permission-denied case, and so avoid starting up location arbitrator. - if (!location_arbitrator_) - location_arbitrator_ = GeolocationArbitrator::GetInstance(); - return location_arbitrator_; + return GeolocationArbitrator::GetInstance(); } void GeolocationPermissionContext::RequestPermissionFromUI( diff --git a/chrome/browser/geolocation/geolocation_permission_context.h b/chrome/browser/geolocation/geolocation_permission_context.h index a537452..8c2d264 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.h +++ b/chrome/browser/geolocation/geolocation_permission_context.h @@ -65,8 +65,6 @@ class GeolocationPermissionContext // This should only be accessed from the UI thread. Profile* const profile_; - scoped_refptr<GeolocationArbitrator> location_arbitrator_; - DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContext); }; |