Title: [166406] trunk/Source/WebCore
Revision
166406
Author
mario.pr...@samsung.com
Date
2014-03-28 08:34:03 -0700 (Fri, 28 Mar 2014)

Log Message

[GTK] Geoclue2 providers won't work after reloading
https://bugs.webkit.org/show_bug.cgi?id=130898

Reviewed by Martin Robinson.

Don't reuse the Geoclue2 client proxy between different calls to
startPosition(), and create a new client proxy each time instead.

* platform/geoclue/GeolocationProviderGeoclue2.cpp:
(GeolocationProviderGeoclue::startUpdating): Don't reuse the
client proxy, by always calling geoclue_manager_call_get_client().
(GeolocationProviderGeoclue::stopUpdating): Disconnect from the
'location-updated' signal and dispose the client proxy.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (166405 => 166406)


--- trunk/Source/WebCore/ChangeLog	2014-03-28 14:18:46 UTC (rev 166405)
+++ trunk/Source/WebCore/ChangeLog	2014-03-28 15:34:03 UTC (rev 166406)
@@ -1,3 +1,19 @@
+2014-03-28  Mario Sanchez Prada  <mario.pr...@samsung.com>
+
+        [GTK] Geoclue2 providers won't work after reloading
+        https://bugs.webkit.org/show_bug.cgi?id=130898
+
+        Reviewed by Martin Robinson.
+
+        Don't reuse the Geoclue2 client proxy between different calls to
+        startPosition(), and create a new client proxy each time instead.
+
+        * platform/geoclue/GeolocationProviderGeoclue2.cpp:
+        (GeolocationProviderGeoclue::startUpdating): Don't reuse the
+        client proxy, by always calling geoclue_manager_call_get_client().
+        (GeolocationProviderGeoclue::stopUpdating): Disconnect from the
+        'location-updated' signal and dispose the client proxy.
+
 2014-03-28  Diego Pino Garcia  <dp...@igalia.com>
 
         [GTK] Too many redirects visiting www.globalforestwatch.org

Modified: trunk/Source/WebCore/platform/geoclue/GeolocationProviderGeoclue2.cpp (166405 => 166406)


--- trunk/Source/WebCore/platform/geoclue/GeolocationProviderGeoclue2.cpp	2014-03-28 14:18:46 UTC (rev 166405)
+++ trunk/Source/WebCore/platform/geoclue/GeolocationProviderGeoclue2.cpp	2014-03-28 15:34:03 UTC (rev 166406)
@@ -73,18 +73,16 @@
         return;
     }
 
-    if (!m_clientProxy) {
-        geoclue_manager_call_get_client(m_managerProxy.get(), nullptr, reinterpret_cast<GAsyncReadyCallback>(getGeoclueClientCallback), this);
-        return;
-    }
-
-    startGeoclueClient();
+    geoclue_manager_call_get_client(m_managerProxy.get(), nullptr, reinterpret_cast<GAsyncReadyCallback>(getGeoclueClientCallback), this);
 }
 
 void GeolocationProviderGeoclue::stopUpdating()
 {
-    if (m_clientProxy)
+    if (m_clientProxy) {
         geoclue_client_call_stop(m_clientProxy.get(), nullptr, nullptr, nullptr);
+        g_signal_handlers_disconnect_by_func(m_clientProxy.get(), reinterpret_cast<gpointer>(locationUpdatedCallback), this);
+        m_clientProxy = nullptr;
+    }
     m_isUpdating = false;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to