Changeset 166406 in webkit


Ignore:
Timestamp:
Mar 28, 2014 8:34:03 AM (10 years ago)
Author:
mario.prada@samsung.com
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r166405 r166406  
     12014-03-28  Mario Sanchez Prada  <mario.prada@samsung.com>
     2
     3        [GTK] Geoclue2 providers won't work after reloading
     4        https://bugs.webkit.org/show_bug.cgi?id=130898
     5
     6        Reviewed by Martin Robinson.
     7
     8        Don't reuse the Geoclue2 client proxy between different calls to
     9        startPosition(), and create a new client proxy each time instead.
     10
     11        * platform/geoclue/GeolocationProviderGeoclue2.cpp:
     12        (GeolocationProviderGeoclue::startUpdating): Don't reuse the
     13        client proxy, by always calling geoclue_manager_call_get_client().
     14        (GeolocationProviderGeoclue::stopUpdating): Disconnect from the
     15        'location-updated' signal and dispose the client proxy.
     16
    1172014-03-28  Diego Pino Garcia  <dpino@igalia.com>
    218
  • trunk/Source/WebCore/platform/geoclue/GeolocationProviderGeoclue2.cpp

    r165418 r166406  
    7474    }
    7575
    76     if (!m_clientProxy) {
    77         geoclue_manager_call_get_client(m_managerProxy.get(), nullptr, reinterpret_cast<GAsyncReadyCallback>(getGeoclueClientCallback), this);
    78         return;
    79     }
    80 
    81     startGeoclueClient();
     76    geoclue_manager_call_get_client(m_managerProxy.get(), nullptr, reinterpret_cast<GAsyncReadyCallback>(getGeoclueClientCallback), this);
    8277}
    8378
    8479void GeolocationProviderGeoclue::stopUpdating()
    8580{
    86     if (m_clientProxy)
     81    if (m_clientProxy) {
    8782        geoclue_client_call_stop(m_clientProxy.get(), nullptr, nullptr, nullptr);
     83        g_signal_handlers_disconnect_by_func(m_clientProxy.get(), reinterpret_cast<gpointer>(locationUpdatedCallback), this);
     84        m_clientProxy = nullptr;
     85    }
    8886    m_isUpdating = false;
    8987}
Note: See TracChangeset for help on using the changeset viewer.