[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:17:50 PDT 2021


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

--- Comment #6 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #5)
> (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.

I don't think it's a matter of new vs old APIs, AFAIK portals where created for sandboxed applications, no?

> > > 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.

If we prefer to use portals for screen sharing and camera access we can simply avoid the shouldUsePortal check in those particular cases, since we already know we should use portals.

> > 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.

Why? Your suggestions are still related to sandboxing, no?

-- 
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/8770cbcf/attachment.htm>


More information about the webkit-unassigned mailing list