WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 40148
Client-based Geolocation does not handle multiple simultaneous requests
https://bugs.webkit.org/show_bug.cgi?id=40148
Summary
Client-based Geolocation does not handle multiple simultaneous requests
Steve Block
Reported
2010-06-03 17:01:41 PDT
Client-based Geolocation does not handle multiple simultaneous requests to Geolocation methods on a single Geolocation object. For client-based Geolocation, Geolocation::startUpdating() adds an observer to the GeolocationController for each new method call. However, the GeolocationController asserts that the same observer is not added twice. Instead, we should allow the same observer to be added multiple times. There's no need to keep track of the number of times a given observer is added as Geolocation::stopUpdating(), which removes the observer, is only called when all requests in the Geolocation object are complete.
Attachments
Patch
(7.09 KB, patch)
2010-06-04 03:30 PDT
,
Steve Block
ap
: review+
steveblock
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2010-06-03 17:06:25 PDT
See also:
bug 39908
. I'm told the original design was that one doesn't add an observer multiple times.
Steve Block
Comment 2
2010-06-04 03:30:33 PDT
Created
attachment 57861
[details]
Patch
Steve Block
Comment 3
2010-06-04 03:34:22 PDT
> I'm told the original design was that one doesn't add an observer multiple > times.
No, the original Geolocation implementation by Greg uses multiple calls to startUpdating(). This is required so that the options for each request can be passed to the provider. When client-based Geolocation was added, each call to startUpdating() adds the observer to the controller. Note that this change fixes reentrant-error.html reentrant-success.html (see Bug 39908) so my patch removes these from the mac skipped list. maximum-age.html is still broken, due to more serious problems with the client-based implementation. Once this change lands, I'll update
Bug 39908
to reflect this.
Alexey Proskuryakov
Comment 4
2010-06-04 10:30:04 PDT
+ on the mac skipped list. reentrant-error.html required a minor tweak as the mac + GeolocationController can only provide an error code of 2 (POSITION_UNAVAILABLE) Maybe it would be useful to also have a test for reentrant "permission denied" error, since that uses a different code path, at least with client-based Geolocation. The patch looks good to me, but it ideally, Sam should review it, since it touches one of the assumptions that were believed true when writing client based geolocation code.
Steve Block
Comment 5
2010-06-04 10:55:47 PDT
> Maybe it would be useful to also have a test for reentrant "permission denied" > error, since that uses a different code path, at least with client-based > Geolocation.
Sure, filed
Bug 40174
Steve Block
Comment 6
2010-06-10 02:30:29 PDT
Sam, could you take a look at this please?
Alexey Proskuryakov
Comment 7
2010-06-10 13:28:15 PDT
Comment on
attachment 57861
[details]
Patch Sam looked at this, and agrees that this is right. Thanks for fixing the problem!
Steve Block
Comment 8
2010-06-11 01:51:25 PDT
Committed
r60998
: <
http://trac.webkit.org/changeset/60998
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug