Comment 62 for bug 604635

Revision history for this message
In , Justin-lebar+bug (justin-lebar+bug) wrote :

> First off, why put the requestWakeLock and wakeLockIsHeld functions on separate objects?

The idea is: requestWakeLock is called by relatively unprivileged content (apps), but wakeLockIsHeld is called only by super-privileged content (gaia). The super-privileged API encompasses wakeLockIsHeld, reboot(), shutDown(), turning the screen on/off, modifying the screen's brightness... Putting the super-privileged API on one object makes the security model clearer.