2010-02-19 Marcus Bulach <bulach@chromium.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Feb 2010 16:57:38 +0000 (16:57 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Feb 2010 16:57:38 +0000 (16:57 +0000)
        Reviewed by Jeremy Orlow.

        Fixes GeolocationServiceBridgeImpl::stopUpdating (it can be called multiple times).

        * src/GeolocationServiceBridgeChromium.cpp:
        (WebKit::GeolocationServiceBridgeImpl::stopUpdating):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55018 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/chromium/ChangeLog
WebKit/chromium/src/GeolocationServiceBridgeChromium.cpp

index b70f325..9e35866 100644 (file)
@@ -1,3 +1,12 @@
+2010-02-19  Marcus Bulach  <bulach@chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        Fixes GeolocationServiceBridgeImpl::stopUpdating (it can be called multiple times).
+
+        * src/GeolocationServiceBridgeChromium.cpp:
+        (WebKit::GeolocationServiceBridgeImpl::stopUpdating):
+
 2010-02-19  Pavel Feldman  <pfeldman@chromium.org>
 
         Not reviewed. Chromium build fix: reverting r54997 and r54998.
index eadcdaf..abbb9c6 100644 (file)
@@ -126,10 +126,12 @@ bool GeolocationServiceBridgeImpl::startUpdating(PositionOptions* positionOption
 
 void GeolocationServiceBridgeImpl::stopUpdating()
 {
-    WebGeolocationServiceInterface* geolocationService = getWebViewClient()->getGeolocationService();
-    geolocationService->stopUpdating(m_bridgeId);
-    geolocationService->dettachBridge(m_bridgeId);
-    m_bridgeId = 0;
+    if (m_bridgeId) {
+        WebGeolocationServiceInterface* geolocationService = getWebViewClient()->getGeolocationService();
+        geolocationService->stopUpdating(m_bridgeId);
+        geolocationService->dettachBridge(m_bridgeId);
+        m_bridgeId = 0;
+    }
 }
 
 void GeolocationServiceBridgeImpl::suspend()