CEF.swift icon indicating copy to clipboard operation
CEF.swift copied to clipboard

Support Mac sandbox v2 (branch 3538 and above)

Open lvsti opened this issue 5 years ago • 0 comments

Branch 3538 (based on Chromium 70) changed the way helper processes are sandboxed, basically by eliminating the unsandboxed warmup phase (spanning from when the dynamic linker has loaded CEFswift/CEF up to the point CEFExecuteProcess was invoked). This will affect considerably how CEFswift may be used in the helper process, and I haven't yet figured out the answer.

To keep up with the builds, I decided to release 3538 half-baked. What this means to you as a CEF.swift end-user:

  • if you like to live dangerously, pass --disable-features=MacV2Sandbox to the browser process in the command line (note: it won't work forever) and keep using the helpers as before (see main.swift in CEFDemo for an example)
  • otherwise, for now you can either:
    • use (and optionally extend) the updated C/C++ helpers (I know, I know)
    • stay on branch 3497 that still uses the old sandboxing model

In the meantime, I'll try to come up with a definitive solution.

More info:

  • https://bitbucket.org/chromiumembedded/cef/issues/2459/macos-enable-the-macv2sandbox
  • https://chromium.googlesource.com/chromium/src/+/master/sandbox/mac/seatbelt_sandbox_design.md

lvsti avatar Nov 23 '18 21:11 lvsti