Closed Bug 764131 Opened 12 years ago Closed 11 years ago

SecReview: Resource Lock API - Fixing the b2g screen wake lock to have permissions

Categories

(mozilla.org :: Security Assurance, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: curtisk, Assigned: pauljt)

References

()

Details

(Whiteboard: [action item])

SecReview Action Item bug Fixing the b2g screen wake lock to have permissions
As far as I can tell, there is no permission implemented yet for resource lock API, and it should probably block the unify permissions manager bug where we are tracking other permissions implementations.
Blocks: 774716
What's the status here?
Assignee: justin.lebar+bug → nobody
Assignee: nobody → ptheriault
So correct me if I am wrong, but get the impression that there is actually nothing to do here anymore. navigator.requestWakeLock() is designed to be available to any content. The management functions in the Power API allow a certified application to listen for lock changes, and act accordingly. It is the responsibility of this management code to protect against risks of battery life, and it isn't appropriate for this to be a permission I dont think. The code that manages the screen in accordance with wakelocks is currently http://mxr.mozilla.org/gaia/source/apps/system/js/screen_manager.js For reference see the implementation bug and also https://developer.mozilla.org/en-US/docs/WebAPI/Power_Management
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
I should also mention that the management parts of this API have a permission since they hang of navigator.mozPower which requires the 'power' permission. Which maybe was the original intent of this bug, not sure, I wasn't directly involved in this review.
> navigator.requestWakeLock() is designed to be available to any content. Yes. I've been reconsidering this lately, but I'm not convinced we need to change it; it's just consideration. :)
See also bug 830660, where we're differentiating wake locks taken by Gecko from wake locks taken by content.
You need to log in before you can comment on or make changes to this bug.