[Webkit-unassigned] [Bug 38323] Prevents setLastPosition() before startUpdating() being called.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 30 09:34:24 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38323





--- Comment #6 from Steve Block <steveblock at google.com>  2010-04-30 09:34:24 PST ---
(From update of attachment 54801)
> +        This prevents a page requesting permission when it has just accessed navigator.geolocation (without calling navigator.geolocation.getGeolocationPosition).
Did you mean navigator.geolocation.getCurrentPosition/watchPosition?

> +    m_startUpdatingRequested = true;
Don't you also need to set this to false in stopUpdating() to prevent
superfluous permission requests after all location requests have stopped?

If a call to navigator.getCurrentPosition/watchPosition is successful, then
permission must have been granted by the time stopUpdating() is called, so
there's no problem. However, if the service returns an error, or JavaScript
cancels the location request before the service returns anything, then there
will be no location requests in progress and no permission request will have
been made. With the current patch, m_startUpdatingRequested will still be true
so subsequent calls to setLastPosition() due to activity in other frames will
wrongly trigger a permission request.

Or does the browser process already have logic to prevent this?

Maybe it's better to modify the browser process to only broadcast location
information to bridges that have called startUpdating() but not stopUpdating(),
as you suggest in the Chromium bug?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list