Closed Bug 495076 Opened 15 years ago Closed 14 years ago

geolocation.watchPosition() may call success callback synchronously

Categories

(Core :: DOM: Geolocation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: steveblock, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.11 (KHTML, like Gecko) Chrome/2.0.181.1 Safari/530.11
Build Identifier: 

The W3C spec requires that geolocation.watchPosition() should be asynchronous - it should return immediately and then invoke a callback. Currently,  geolocation.watchPosition() sometimes calls the success callback synchronously.

This seems to occur only when the implementation has a cached position and when  Geolocation permissions have been remembered.

Reproducible: Sometimes

Steps to Reproduce:
1. Call geolocation.watchPosition()
2.
3.
Actual Results:  
The success callback is called synchronously.

Expected Results:  
The success callback should be called asynchronously.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
This is a mass change. Every comment has "assigned-to-new" in it.

I didn't look through the bugs, so I'm sorry if I change a bug which shouldn't be changed. But I guess these bugs are just bugs that were once assigned and people forgot to change the Status back when unassigning.
Status: ASSIGNED → NEW
Thanks Steve,

Bug 489813 will fix this bug.
Depends on: 489813
http://hg.mozilla.org/mozilla-central/rev/0d8d6369655d
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.