From 4da4f5edbf9de5c4269cf66d70044f4cb3abdc41 Mon Sep 17 00:00:00 2001 From: Hiroki Tagato Date: Wed, 24 Nov 2021 17:28:24 +0900 Subject: devel/electron13: update to 13.6.2 (and rename from devel/electron12) Changelog: https://www.electronjs.org/blog/electron-13-0 --- .../files/patch-sandbox_policy_sandbox.cc | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 devel/electron13/files/patch-sandbox_policy_sandbox.cc (limited to 'devel/electron13/files/patch-sandbox_policy_sandbox.cc') diff --git a/devel/electron13/files/patch-sandbox_policy_sandbox.cc b/devel/electron13/files/patch-sandbox_policy_sandbox.cc new file mode 100644 index 000000000000..7d1df01de6e0 --- /dev/null +++ b/devel/electron13/files/patch-sandbox_policy_sandbox.cc @@ -0,0 +1,35 @@ +--- sandbox/policy/sandbox.cc.orig 2021-07-15 19:13:43 UTC ++++ sandbox/policy/sandbox.cc +@@ -12,6 +12,10 @@ + #include "base/android/jni_android.h" + #endif // defined(OS_ANDROID) + ++#if defined(OS_FREEBSD) ++#include "sandbox/policy/freebsd/sandbox_freebsd.h" ++#endif // defined(OS_FREEBSD) ++ + #if defined(OS_LINUX) || defined(OS_CHROMEOS) + #include "sandbox/policy/linux/sandbox_linux.h" + #endif // defined(OS_LINUX) || defined(OS_CHROMEOS) +@@ -29,6 +33,12 @@ + namespace sandbox { + namespace policy { + ++#if defined(OS_FREEBSD) ++bool Sandbox::Initialize(SandboxType sandbox_type) { ++ return SandboxFreeBSD::GetInstance()->InitializeSandbox(sandbox_type); ++} ++#endif // defined(OS_FREEBSD) ++ + #if defined(OS_LINUX) || defined(OS_CHROMEOS) + bool Sandbox::Initialize(SandboxType sandbox_type, + SandboxLinux::PreSandboxHook hook, +@@ -89,6 +99,8 @@ bool Sandbox::IsProcessSandboxed() { + base::android::MethodID::Get( + env, process_class.obj(), "isIsolated", "()Z"); + return env->CallStaticBooleanMethod(process_class.obj(), is_isolated); ++#elif defined(OS_FREEBSD) ++ return SandboxFreeBSD::GetInstance()->IsSandboxed(); + #elif defined(OS_FUCHSIA) + // TODO(https://crbug.com/1071420): Figure out what to do here. Process + // launching controls the sandbox and there are no ambient capabilities, so -- cgit v1.2.3