Bug 738102 - devicemotion causes shutdown crash. r=jdm

This commit is contained in:
Doug Turner 2012-03-21 22:27:51 -07:00
parent 3f258f18bb
commit b455a8dbc5

View File

@ -33,7 +33,11 @@ void UpdateHandler(nsITimer *aTimer, void *aClosure)
}
void
EnableSensorNotifications(SensorType aSensor) {
EnableSensorNotifications(SensorType aSensor)
{
if (aSensor != SENSOR_ACCELERATION)
return;
if (sUpdateTimer)
return;
@ -49,7 +53,11 @@ EnableSensorNotifications(SensorType aSensor) {
}
void
DisableSensorNotifications(SensorType aSensor) {
DisableSensorNotifications(SensorType aSensor)
{
if (aSensor != SENSOR_ACCELERATION)
return;
if (sUpdateTimer) {
sUpdateTimer->Cancel();
NS_RELEASE(sUpdateTimer);