mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 688158 - Make navigator.geolocation return null if geolocation is disabled. r=jst
This commit is contained in:
parent
c5e7c1fde8
commit
e2cd980b50
@ -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