Closed Bug 992105 Opened 10 years ago Closed 10 years ago

WakeLockListener can unlock screensaver while video is still playing on Windows

Categories

(Core :: Audio/Video, defect)

x86
Windows 7
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: eflores, Assigned: cpearce)

Details

Attachments

(1 file)

Currently the Windows WakeLockListener locks/unlocks the screensaver based on the last lock/unlock event it received.

Sometimes the WakeLockListener can unlock the screensaver before video playback ends.

STR:
1. Go to http://cd.pn/b2
2. Hit play
3. Fullscreen the video
4. Exit fullscreen
5. Wait for screensaver

Expected:
Screensaver shouldn't appear until after the video finishes.

Actual:
Screensaver can appear while the video is playing.

This is because the WakeLockListener receives an "unlocked" state with topic "DOM_Fullscreen" and thus unlocks the screensaver -- even though the "screen" topic has asked for a "locked" state. The WakeLockListener should store a set of topics that have requested a wake lock and only unlock the screensaver once that set is empty.
Since jimm is away, edwin can you review this. Though you may find this code eerily familiar...
Assignee: nobody → cpearce
Status: NEW → ASSIGNED
Attachment #8402409 - Flags: review?(edwin)
Comment on attachment 8402409 [details] [diff] [review]
Patch: Track what topics requested screen wakelock win WinWakeLockListener

Review of attachment 8402409 [details] [diff] [review]:
-----------------------------------------------------------------

Couldn't have done it better myself. ;)
Attachment #8402409 - Flags: review?(edwin) → review+
Needed an #include "nsHashKeys.h". Thank you unified builds.
https://hg.mozilla.org/mozilla-central/rev/e129328fdfe3
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: