mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 18:32:00 +00:00
bug 603336 - e10s & MozOrientation, content crash r=dougt a=blocking-fennec
This commit is contained in:
parent
027592ef2a
commit
9920c230f8
@ -1,4 +1,5 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
@ -57,6 +58,8 @@ AndroidLocationProvider::~AndroidLocationProvider()
|
||||
NS_IMETHODIMP
|
||||
AndroidLocationProvider::Startup()
|
||||
{
|
||||
if (!AndroidBridge::Bridge())
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
AndroidBridge::Bridge()->EnableLocation(true);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -73,6 +76,8 @@ AndroidLocationProvider::Watch(nsIGeolocationUpdate* aCallback)
|
||||
NS_IMETHODIMP
|
||||
AndroidLocationProvider::Shutdown()
|
||||
{
|
||||
if (!AndroidBridge::Bridge())
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
AndroidBridge::Bridge()->EnableLocation(false);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
@ -53,10 +54,12 @@ nsAccelerometerSystem::~nsAccelerometerSystem()
|
||||
|
||||
void nsAccelerometerSystem::Startup()
|
||||
{
|
||||
AndroidBridge::Bridge()->EnableAccelerometer(true);
|
||||
if (AndroidBridge::Bridge())
|
||||
AndroidBridge::Bridge()->EnableAccelerometer(true);
|
||||
}
|
||||
|
||||
void nsAccelerometerSystem::Shutdown()
|
||||
{
|
||||
AndroidBridge::Bridge()->EnableAccelerometer(false);
|
||||
if (AndroidBridge::Bridge())
|
||||
AndroidBridge::Bridge()->EnableAccelerometer(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user