Comment on attachment 8419908
Implement WakeLockListener on Linux to disable screensaver while video is
playing
>+NS_IMPL_ISUPPORTS1(WakeLockListener, nsIDOMMozWakeLockListener)
Will need to remove the '1' here now.
>+ dbus_pending_call_set_notify(reply, &ReceiveInhibitReply, this,
NULL);
|this| needs to stay alive until the reply is received, and I assume that may
be after the power manager service is deleted.
There are probably several ways to handle this: perhaps add a reference to the
WakeLockListener, and remove in free_user_data; or make the WakeLockListener a
singleton and check that it still exists in ReceiveInhibitReply().
>+ DBusError err;
>+ dbus_error_init(&err);
This should be freed if set, but easier is to just pass nullptr.
>+WakeLockTopic::InhibitScreensaver()
>+{
>+ NS_ASSERTION(!mShouldInhibit, "Screensaver is already inhibited");
>+WakeLockTopic::UninhibitScreensaver()
>+{
>+ if (!mShouldInhibit) {
>+ // Screensaver isn't inhibited. Nothing to do here.
>+ return NS_OK;
Could this instead assert that this path is not reached, as in
InhibitScreensaver()?
>+ nsClassHashtable<nsStringHashKey, WakeLockTopic> mTopics;
Topics are never removed from this hashtable (until shutdown). Is there a
small finite sized set of topics? Please add a comment stating this
assumption.
>+ virtual ~WakeLockListener() MOZ_FINAL;
By moving the MOZ_FINAL to the class definition, this destructor need not be
virtual.
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/434476
Title:
screensaver starts while playing HTML5 videos
Status in The Mozilla Firefox Browser:
Confirmed
Status in “firefox” package in Ubuntu:
Confirmed
Status in “firefox-3.5” package in Ubuntu:
Triaged
Bug description:
Binary package hint: firefox-3.5
karmic alpha6 + updates
- click on a .ogv video link
- after watching some time, screensaver starts.
ProblemType: Bug
Architecture: amd64
Date: Tue Sep 22 08:45:53 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: firefox 3.5.3+build1+nobinonly-0ubuntu2
PackageArchitecture: all
ProcEnviron:
LANG=de_AT.UTF-8
SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-10.34-generic
SourcePackage: firefox-3.5
Uname: Linux 2.6.31-10-generic x86_64
To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/434476/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp