[Webkit-unassigned] [Bug 27690] Don't override m_allowGeolocation set by ChromeClient::requestGeolocationPermissionForFrame

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 3 09:52:52 PDT 2009


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


steveblock at google.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steveblock at google.com




--- Comment #3 from steveblock at google.com  2009-08-03 09:52:51 PDT ---
> I assume this client call is expected to be async not synchronous?
That's correct.  I'm not sure if there's any need to support synchronous client
calls.

> Whoever wrote the geolocation stuff should review this.
This was written by Greg. However, I'm pretty sure that this patch doesn't fix
the problem correctly.

If the supplied patch is used, and requestGeolocationPermissionsForFrame is
implemented synchronously, watches will be called back twice, rather than once.

geolocationServicePositionChanged() assumes that if requestPermission() calls
requestGeolocationPermissionsForFrame(), isAllowed() will return false
immediately after requestPermission() returns. If
requestGeolocationPermissionsForFrame() is implemented synchronously. this is
not true.

So from geolocationServicePositionChanged(), requestPermission() will call
requestGeolocationPermissionsForFrame(), which will synchronously call
setIsAllowed(), call back into geolocationServicePositionChanged() and call
back the one-shots and watchers. When requestPermission returns, isAllowed()
will return true and the watchers will be called back a second time.

-- 
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