Bug 87033 - Geolocation is not robust to unexpected updates from GeolocationClient
Summary: Geolocation is not robust to unexpected updates from GeolocationClient
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 11:31 PDT by Steve Block
Modified: 2012-05-27 15:06 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Block 2012-05-21 11:31:10 PDT
Geolocation does not correctly handle updates from the client (via the controller) when they are not expected. For example ...
- A request is made
- Geolocation starts the client
- Permission is denied
- Geolocation invokes the error callback and stops the client, so expects no further updates from the client
- A new request is made
- Geolocation schedules an error callback
- Client makes an unexpected call to Geolocation::positionChanged()
- Geolocation erroneously calls the success callback

This means that tests which manipulate the mock in ways which fall outside of the expected pattern are flaky. For example, permission-denied-already-[error|success].html configure the mock to deny permission, but then later provide a position update.

We should either make Geolocation robust to this case, or update/remove the tests.
Comment 1 Benjamin Poulain 2012-05-27 15:06:37 PDT
> - Permission is denied
> [...]
> - Client makes an unexpected call to Geolocation::positionChanged()
> - Geolocation erroneously calls the success callback

Actually, this is now considered an error of the Client and I am pretty sure that should crash nowadays (see r113505 and some previous changes).

I am in favor of updating the tests doing this. What is your opinion on this issue?