mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1240664 - Only enable bug 1216148's behavior when there is a wakelock support. r=kanru
This commit is contained in:
parent
37e61e7439
commit
240ad48f2f
@ -1277,7 +1277,8 @@ Geolocation::Init(nsPIDOMWindowInner* aContentDom)
|
||||
|
||||
mPrincipal = doc->NodePrincipal();
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
if (Preferences::GetBool("dom.wakelock.enabled") &&
|
||||
XRE_IsContentProcess()) {
|
||||
doc->AddSystemEventListener(NS_LITERAL_STRING("visibilitychange"),
|
||||
/* listener */ this,
|
||||
/* use capture */ true,
|
||||
@ -1380,7 +1381,8 @@ Geolocation::Shutdown()
|
||||
mPendingCallbacks.Clear();
|
||||
mWatchingCallbacks.Clear();
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
if (Preferences::GetBool("dom.wakelock.enabled") &&
|
||||
XRE_IsContentProcess()) {
|
||||
if (nsCOMPtr<nsPIDOMWindowInner> window = do_QueryReferent(mOwner)) {
|
||||
nsCOMPtr<nsIDocument> doc = window->GetExtantDoc();
|
||||
if (doc) {
|
||||
|
Loading…
Reference in New Issue
Block a user