Comment 122 for bug 604635

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

> Some wake locks should probably be canceled earlier than that -- for example, the screen wake lock
> should probably be canceled if the document which requested the lock becomes invisible (e.g., I
> switch away from that tab).

Actually, this is a bit more complex than I thought.

The trick is, we want all policy to live in Gaia. (Where by "Gaia", I mean Gaia or an alternative.) That should include the meaning of the wake-lock topics.

So in order for this to work, isWakeLockHeld() needs to return some information about the documents holding the relevant wake lock. Maybe the info is just [not held, held by at least one visible document, held only by invisible documents].

Chris, do you have any thoughts here?