Bug 758093 - Fix b2g debug build. r=fabrice

This commit is contained in:
Gregor Wagner 2012-05-23 20:43:17 -07:00
parent 6d3a904ca5
commit 492adb808c

View File

@ -10,6 +10,7 @@
#include "nsIScreen.h"
#include "nsIScreenManager.h"
#include "OrientationObserver.h"
#include "mozilla/HalSensor.h"
using namespace mozilla;
using namespace dom;
@ -175,7 +176,7 @@ OrientationObserver::Notify(const hal::SensorData& aSensorData)
{
// Sensor will call us on the main thread.
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aSensorData.sensor() == SensorType::SENSOR_ORIENTATION);
MOZ_ASSERT(aSensorData.sensor() == hal::SensorType::SENSOR_ORIENTATION);
InfallibleTArray<float> values = aSensorData.values();
// Azimuth (values[0]): the device's horizontal orientation
@ -237,7 +238,7 @@ OrientationObserver::Notify(const hal::SensorData& aSensorData)
void
OrientationObserver::EnableAutoOrientation()
{
MOZ_ASSERT(NS_IsMainThread() && !AutoOrientationEnabled());
MOZ_ASSERT(NS_IsMainThread() && !mAutoOrientationEnabled);
hal::RegisterSensorObserver(hal::SENSOR_ORIENTATION, this);
mAutoOrientationEnabled = true;
@ -258,8 +259,8 @@ OrientationObserver::DisableAutoOrientation()
bool
OrientationObserver::LockScreenOrientation(ScreenOrientation aOrientation)
{
MOZ_ASSERT(eScreenOrientation_None < aOrientations &&
aOrientations < eScreenOrientation_EndGuard);
MOZ_ASSERT(eScreenOrientation_None < aOrientation &&
aOrientation < eScreenOrientation_EndGuard);
// Enable/disable the observer depending on 1. multiple orientations
// allowed, and 2. observer enabled.