Closed Bug 799437 Opened 12 years ago Closed 7 years ago

navigator.battery doesn't work when Nightly is built on OSX 10.8.2

Categories

(Core :: DOM: Device Interfaces, defect)

19 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: maligree, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14

Steps to reproduce:

Some time ago, I built Firefox from mozilla-central and noticed some battery-related mochitests failing. I got distracted and never gave it much thought, though. So today I built revision aa5e3b445810 and noticed that navigator.battery indeed doesn't work properly for me. 

Building on OS X 10.8.2 (via make -f client.mk), no build options except for --enable-debug.


Actual results:

When on AC power, navigator.battery.charging returns false.
Also, navigator.battery.chargingTime returns Infinite.


Expected results:

Expecting navigator.battery.charging to return true, and navigator.battery.chargingTime to return 0 (battery was fully charged).

This does happen with a built-by-mozilla (i.e. downloaded) version of Nightly, so it seems that something gets lost during my build.
If you need more insight, I'm absolutely comfortable doing some debugging, but not yet that familiar with the codebase.

I tried to set a breakpoint at mozilla::dom::battery::BatteryManager::GetCharging(bool*) to get any insight, but it doesn't get triggered on navigator.battery.charging.
Component: Untriaged → DOM: Device Interfaces
Product: Firefox → Core
We disabled this API in bug 1313580.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.