Closed
Bug 688158
Opened 13 years ago
Closed 13 years ago
geo.enable => false should make navigator.geolocation undefined
Categories
(Core :: DOM: Geolocation, defect)
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: paulirish, Assigned: jdm)
Details
Attachments
(1 file)
915 bytes,
patch
|
jst
:
review+
dougt
:
feedback+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.4 (KHTML, like Gecko) Chrome/16.0.887.0 Safari/535.4 Steps to reproduce: - about:config - set geo.enable to false - try: navigator.geolocation && navigator.geolocation.getCurrentPosition( function(){ console.log('success', arguments); }, function(){ console.log('error', arguments); } ); Actual results: getCurrentPosition threw an exception: [11:44:41.359] [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMGeoGeolocation.getCurrentPosition]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: Web Console :: <TOP_LEVEL> :: line 1" data: no] Expected results: Ideally navigator.geolocation is undefined, so feature detection is accurate. Pages relying on detecting navigator.geolocation exists are changing behavior expecting it to succeed (or at least, prompt the user). Next best thing is the error callback is executed.
Assignee | ||
Comment 1•13 years ago
|
||
Agreed, this DOM call shouldn't throw.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Updated•13 years ago
|
Component: General → Geolocation
QA Contact: general → geolocation
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #561469 -
Flags: review?(jst)
Assignee | ||
Comment 3•13 years ago
|
||
Comment on attachment 561469 [details] [diff] [review] Make navigator.geolocation if geolocation is disabled. Doug, is navigator.geolocation returning null a decent behaviour here?
Attachment #561469 -
Flags: feedback?(doug.turner)
Comment 4•13 years ago
|
||
Comment on attachment 561469 [details] [diff] [review] Make navigator.geolocation if geolocation is disabled. this is okay... but I still think people will be able to test for interface Geolocation, and NavigatorGeolocation.
Attachment #561469 -
Flags: feedback?(doug.turner) → feedback+
Updated•13 years ago
|
Attachment #561469 -
Flags: review?(jst) → review+
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/8232007db7e5
Assignee: nobody → josh
Flags: in-testsuite-
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → mozilla10
Comment 6•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8232007db7e5
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•