[Webkit-unassigned] [Bug 193571] [GTK][WPE] Add API to add paths to sandbox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 24 03:42:31 PST 2019


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

--- Comment #24 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 359878
  --> https://bugs.webkit.org/attachment.cgi?id=359878
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=359878&action=review

> Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:1189
> +void webkit_web_context_add_path_to_sandbox(WebKitWebContext* context, const char* path, gboolean read_only)

read_only -> readOnly

> Source/WebKit/UIProcess/Launcher/ProcessLauncher.h:49
> +#if PLATFORM(GTK) || PLATFORM(WPE)
> +enum class SandboxPermission {
> +    ReadOnly,
> +    ReadWrite,
> +};
> +#endif

I think this belongs to WebProcessPool.h, where the api is defined.

> Source/WebKit/UIProcess/Launcher/ProcessLauncher.h:79
> +        HashMap<String, SandboxPermission> extraSandboxPaths;

This could be a ref to avoid copying the map.

> Source/WebKit/UIProcess/WebProcessPool.h:474
> +    void appendSandboxPaths(const String& path, SandboxPermission permission) { m_extraSandboxPaths.set(path, permission); };

Why Paths? it takes only one path.

> Source/WebKit/UIProcess/WebProcessPool.h:475
> +    HashMap<String, SandboxPermission> sandboxPaths() { return m_extraSandboxPaths; };

This should const and return a const reference.

> Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp:47
> +    launchOptions.extraSandboxPaths = m_processPool->sandboxPaths();

Could we make the Vector<CString> here instead of passing the map to the launcher? That way we don't copy the map for sure.

-- 
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/20190124/f378f36f/attachment.html>


More information about the webkit-unassigned mailing list