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

Unified Diff: chrome/renderer/geolocation_dispatcher.cc

Issue 6196004: Discard geolocation update if dispatcher is not updating. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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: chrome/renderer/geolocation_dispatcher.cc
diff --git a/chrome/renderer/geolocation_dispatcher.cc b/chrome/renderer/geolocation_dispatcher.cc
index e944673f7fe01874ba8893dba5b82e6c47ec8c45..aefc346c16154cfe81ff31aca596135afe345a37 100644
--- a/chrome/renderer/geolocation_dispatcher.cc
+++ b/chrome/renderer/geolocation_dispatcher.cc
@@ -113,7 +113,11 @@ void GeolocationDispatcher::OnGeolocationPermissionSet(
// We have an updated geolocation position or error code.
void GeolocationDispatcher::OnGeolocationPositionUpdated(
const Geoposition& geoposition) {
- DCHECK(updating_);
+ // It is possible for the browser process to have queued an update message
+ // before receiving the stop updating message.
+ if (!updating_)
+ return;
+
DCHECK(geoposition.IsInitialized());
if (geoposition.IsValidFix()) {
controller_->positionChanged(
« 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