bug 603336 - e10s & MozOrientation, content crash r=dougt a=blocking-fennec

This commit is contained in:
Brad Lassey 2010-10-19 14:35:31 -04:00
parent 027592ef2a
commit 9920c230f8
2 changed files with 12 additions and 4 deletions

View File

@ -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;
}

View File

@ -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);
}