[Webkit-unassigned] [Bug 231670] [GLIB] Simplify SleepDisabler by checking if we are under sandbox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 14 06:11:22 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231670

--- Comment #5 from Michael Catanzaro <mcatanzaro at gnome.org> ---
(In reply to Carlos Garcia Campos from comment #4)
> Why? If I'm not wrong, using the portal normally requires more DBus messages
> than using the original DBus service directly.

It doesn't matter. I normally prefer to use newer things and fall back to older things only if the newer thing is not present. If the newer API works in all cases, that keeps the code simpler. But in this case, the newer API does not work in all cases, so you really need to choose, which is why your changes to SleepDisablerGLib.cpp look good.

> > So checking whether we're sandboxed
> > first isn't *generally* recommended or necessary.
> 
> I took this approach from GTK4 for what is worth.

Right, but GTK does not do screen sharing or camera access, so our needs are different.

> What's wrong with Sandbox.h?

The naming is OK as your patch is now, but it won't make as much sense aftre my suggested changes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211014/48967f6a/attachment-0001.htm>


More information about the webkit-unassigned mailing list