Closed Bug 732928 Opened 13 years ago Closed 10 years ago

When calling navigator.geolocation.getCurrentPosition(), it will fail on timeout if a previous request has been made with a timeout option.

Categories

(Core :: DOM: Geolocation, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: marceloblechner, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 Steps to reproduce: I implemented a javascript application that periodically calls navigator.geolocation.getCurrentPosition with a timeout. Actual results: For instance, I call navigator.geolocation.getCurrentPosition(callback, erorrCb, {timeout:10000}). Even if either callback or errorCb fires instantly after the request, the next request will fail if I don't wait at least 10000 milliseconds. Expected results: The timer within the geolocation implementation in Firefox should have been reset after either the success callback or the error callback had fired and the next request should not have failed.
Could you attach a testcase to this bug, or link to one somewhere? Timeouts are implemented per-request, so it's curious that the bug described should be manifesting. Furthermore, which version of Firefox are you seeing this behaviour in?
This attachment shows that, calling getCurrentPosition twice with a timeout set, the second request will fail after the timeout, even if the first request had fired one of the callbacks instantly.
I've added a test case with some console.log calls. I've tested it on Firefox 3.6.27 (which is the version that my application currently supports) and on Firefox Portable 10.0.2. Same behavior in both versions.
Attachment #602919 - Attachment mime type: text/plain → text/html
Would you be able to download a nightly version of Firefox (http://nightly.mozilla.org/) and see if you can reproduce this behaviour? I am having trouble replicating your results with Firefox 14.
This couldn't be reproduced and no new information given by original reporter.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: