Closed Bug 1360069 Opened 8 years ago Closed 7 years ago

Don't send redundant DBus wakelock calls from child processes

Categories

(Core :: Widget: Gtk, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jld, Assigned: jld)

References

(Blocks 1 open bug)

Details

(Whiteboard: tpi:+)

Attachments

(2 files)

Assuming I understand what's going on here: nsAppShell::Init installs a WakeLockListener, currently in each process, that uses DBus to message the desktop environment to suppress the screensaver (if DBus support is configured). But the parent process broadcasts the notifications to each content process (HalParent, subclass of WakeLockObserver), so we get n+1 DBus method calls. This is more of a problem for sandboxing, because this needs to open (and then leaves open) a DBus connection that could be used for privilege escalation — I still don't understand DBus very well, but I suspect there's *something* on the session bus that could be leveraged into running arbitrary commands. But, if this is always initiated in the parent process (and I think it is?), then it would suffice to just not install that WakeLockListener in child processes. I already have a patch for this, but the question is whether it breaks things that don't have automated tests.
Priority: -- → P2
Whiteboard: tpi:+
To try to test this, I took an Ubuntu 16.04 VM, with the default desktop environment, set the screen lock timeout to 1 minute, and played a full-screen YouTube video for longer than that.
Comment on attachment 8881645 [details] Bug 1360069 - Deal with the case where WakeLockListener is never instantiated. https://reviewboard.mozilla.org/r/152802/#review157966
Attachment #8881645 - Flags: review?(gpascutto) → review+
Comment on attachment 8881646 [details] Bug 1360069 - Don't do unnecessary wakelock signaling from content processes. https://reviewboard.mozilla.org/r/152804/#review157970
Attachment #8881646 - Flags: review?(gpascutto) → review+
Pushed by jedavis@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3103713ebe59 Deal with the case where WakeLockListener is never instantiated. r=gcp https://hg.mozilla.org/integration/autoland/rev/775275d2d0c5 Don't do unnecessary wakelock signaling from content processes. r=gcp
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
See Also: → 1386308
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: