[Webkit-unassigned] [Bug 40002] Need Geolocation LayoutTest to test case where permission has neither been granted nor denied

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 7 10:19:38 PDT 2010


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





--- Comment #6 from Steve Block <steveblock at google.com>  2010-06-07 10:19:38 PST ---
Thanks for the review Alexey.

> This calls out from DRT code, so UIDelegate may be released in the meanwhile.
> I'd use a local variable for the listener.
I'm not sure I understand. When would the UI delegate be released while script is still running?

> +    if (!_timer)
> +        _timer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(timerFired) userInfo:0 repeats:NO];
> 
> I don't understand this change. Ideally, the allow/deny callback should be
> completely asynchronous (and not dispatched from setGeolocationPermission()
> directly), but this change doesn't give us that. Is this what you refer to as
> "minor fix" in the ChangeLog?
This change is the "minor fix". Previously, the MockGeolocationProvider didn't trigger a position update to the WebView when it registered - only when a new mock position was set. It relied on the fact that the WebView was registered synchronously along with the call to set the mock position. So by the time the MockGeolocationProvider's timer fired, the Webview was registered and it would be sent the position. Now that the permission is granted asynchronously, the WebView is also added asynchronously (Geolocation does not call startUpdating() until permission is granted). So there's a race condition and the timer may fire before the WebView is registered. This change makes sure that the WebView gets the position when it registers.

I think the above change is independent of whether the allow/deny callback is completely asynchronous. Is there a particular need for it to be completely asynchronous?

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