[Webkit-unassigned] [Bug 27255] Geolocation incorrectly calls error callback in case of exception in success callback

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 4 05:11:25 PDT 2009


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





--- Comment #5 from Andrei Popescu <andreip at google.com>  2009-08-04 05:11:24 PDT ---
Hi,

The spec currently says:

"UNKNOWN_ERROR (numeric value 0)
The location acquisition process failed due to an error not covered by the
definition of any other error code in this interface."

http://dev.w3.org/geo/api/spec-source.html#unknown_error

So UNKNOWN denotes an error in acquiring a position (it is a catch-all value
for any situation not covered by the other error codes). If the UA is executing
the success callback, then it means that the position was successfully acquired
so, as far as the UA is concerned, the job is done. 

It can, of course, happen that the success callback throws an exception but I
think this is a problem with the user code and not the Geolocation API
implementation. As such, error callback should not be invoked. Instead, I think
an error event should be raised and window.onerror should be invoked (if
defined) or the error should be logged to the JS console.

Andrei

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