Add a pref to disable Battery API

RESOLVED FIXED in mozilla10

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

({user-doc-needed})

Trunk
mozilla10
user-doc-needed
Points:
---
Bug Flags:
in-testsuite ?
in-litmus ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Something like "dom.battery.enabled". true by default but can be turned false. In that case, I don't know if navigator.mozBattery should return null or if we should return the default values. I'm worried returning null might break some websites.
Or not be exposed at all?
The property shouldn't be defined at all.  That's what we do for other preffable DOM features.

See nsIDOMStorageIndexedDB.
(Assignee)

Comment 3

6 years ago
That would be better indeed but that would make changing the pref during run time useless, right? Seems a fair trade though.
> That would be better indeed but that would make changing the pref during run time
> useless, 

Depends on how we implement.  If we look at the pref during prototype setup, then flipping the pref and reloading the page would work.  If we only look at it during the classinfo initialization stuff then flipping it would need a browser restart, yes.
(Assignee)

Updated

6 years ago
Flags: in-testsuite?
Flags: in-litmus?
Keywords: user-doc-needed
(Assignee)

Comment 5

6 years ago
Created attachment 571817 [details] [diff] [review]
Patch v1
Attachment #571817 - Flags: review?(jonas)
(Assignee)

Comment 6

6 years ago
We should probably push this before the Aurora uplift (the 8th). Worst case, we could directly push it to Aurora but better to prevent this.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla10
Attachment #571817 - Flags: review?(jonas) → review+

Comment 7

6 years ago
https://hg.mozilla.org/mozilla-central/rev/ae94f0235649
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.