зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570212 - Convert geo.timeout to a static pref. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D40156 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1814e8c4b2
Коммит
0de3df67cd
|
@ -503,12 +503,7 @@ NS_INTERFACE_MAP_END
|
|||
NS_IMPL_ADDREF(nsGeolocationService)
|
||||
NS_IMPL_RELEASE(nsGeolocationService)
|
||||
|
||||
static int32_t sProviderTimeout = 6000; // Time, in milliseconds, to wait for
|
||||
// the location provider to spin up.
|
||||
|
||||
nsresult nsGeolocationService::Init() {
|
||||
Preferences::AddIntVarCache(&sProviderTimeout, "geo.timeout",
|
||||
sProviderTimeout);
|
||||
if (!StaticPrefs::geo_enabled()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -688,7 +683,8 @@ void nsGeolocationService::SetDisconnectTimer() {
|
|||
mDisconnectTimer->Cancel();
|
||||
}
|
||||
|
||||
mDisconnectTimer->Init(this, sProviderTimeout, nsITimer::TYPE_ONE_SHOT);
|
||||
mDisconnectTimer->Init(this, StaticPrefs::geo_timeout(),
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
|
||||
bool nsGeolocationService::HighAccuracyRequested() {
|
||||
|
|
|
@ -2598,6 +2598,12 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Time, in milliseconds, to wait for the location provider to spin up.
|
||||
- name: geo.timeout
|
||||
type: int32_t
|
||||
value: 6000
|
||||
mirror: always
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Prefs starting with "gfx."
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче