There is a bug in the code of the Geoclue2 geolocation provider that prevents geolocation from working if you try to reload a page after having started using the geolocation API previously. Steps to reproduce: 1. Open http://html5demos.com/geo in a geolocation in Minibrowser 2. Allow to know the location when requested through a dialog 3. Wait until it says "Found you!" 4. Reload the page and repeat step 2 Expected outcome: You should see the found location once again Actual: You will see "Failed" instead, because the geolocation provider is trying to use the same client proxy for geoclue2 service, that is no longer available after having called geoclue_client_call_stop() in GeolocarionProviderGeoclue::stopUpdating(), since apparently it can be reused from previous times.
Created attachment 228049 [details] Patch proposal The fix is quite simple. Please consider reviewing it quickly so we can request integrating it into the stable branch before the next release. Thanks!
Comment on attachment 228049 [details] Patch proposal View in context: https://bugs.webkit.org/attachment.cgi?id=228049&action=review > Source/WebCore/platform/geoclue/GeolocationProviderGeoclue2.cpp:76 > - startGeoclueClient(); > + geoclue_manager_call_get_client(m_managerProxy.get(), nullptr, reinterpret_cast<GAsyncReadyCallback>(getGeoclueClientCallback), this); You don't mention in the changelog why you no longer call startGeoclueClient.
(In reply to comment #2) > (From update of attachment 228049 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=228049&action=review > > > Source/WebCore/platform/geoclue/GeolocationProviderGeoclue2.cpp:76 > > - startGeoclueClient(); > > + geoclue_manager_call_get_client(m_managerProxy.get(), nullptr, reinterpret_cast<GAsyncReadyCallback>(getGeoclueClientCallback), this); > > You don't mention in the changelog why you no longer call startGeoclueClient. I no longer call him here because it will be called later on, once the client proxy is created, down in createGeoclueClientProxyCallback(). Not sure whether it's worth mentioning that in the ChangeLog?
Comment on attachment 228049 [details] Patch proposal Thanks for the review!
Comment on attachment 228049 [details] Patch proposal Clearing flags on attachment: 228049 Committed r166406: <http://trac.webkit.org/changeset/166406>
All reviewed patches have been landed. Closing bug.