mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 688158 - Make navigator.geolocation return null if geolocation is disabled. r=jst
This commit is contained in:
parent
16846fe970
commit
9879fe34cb
@ -11321,6 +11321,9 @@ NS_IMETHODIMP nsNavigator::GetGeolocation(nsIDOMGeoGeolocation **_retval)
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
*_retval = nsnull;
|
||||
|
||||
if (!Preferences::GetBool("geo.enabled", PR_TRUE))
|
||||
return NS_OK;
|
||||
|
||||
if (mGeolocation) {
|
||||
NS_ADDREF(*_retval = mGeolocation);
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user