Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1379)

Unified Diff: content/browser/geolocation/geolocation_dispatcher_host.cc

Issue 10644008: Make SendGeolocationPermissionResponse execute on UI thread. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/geolocation_dispatcher_host.cc
diff --git a/content/browser/geolocation/geolocation_dispatcher_host.cc b/content/browser/geolocation/geolocation_dispatcher_host.cc
index 6eb9c07eac46cd2b5188f18adc047ec8409b698b..3f98f5ced1ec5cb16cbb9015fa9b98b4122ee7d1 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.cc
+++ b/content/browser/geolocation/geolocation_dispatcher_host.cc
@@ -33,6 +33,7 @@ void SendGeolocationPermissionResponse(int render_process_id,
int render_view_id,
int bridge_id,
bool allowed) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
RenderViewHostImpl* r = RenderViewHostImpl::FromID(
render_process_id, render_view_id);
if (!r)
@@ -149,8 +150,11 @@ void GeolocationDispatcherHostImpl::OnRequestPermission(
&SendGeolocationPermissionResponse,
render_process_id_, render_view_id, bridge_id));
} else {
- SendGeolocationPermissionResponse(
- render_process_id_, render_view_id, bridge_id, true);
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ base::Bind(
+ &SendGeolocationPermissionResponse,
+ render_process_id_, render_view_id, bridge_id, true));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698