fix: disable Chromium v2 sandbox in MAS builds (#16920)
This commit is contained in:
parent
de27911661
commit
e769b867f0
2 changed files with 7 additions and 5 deletions
4
BUILD.gn
4
BUILD.gn
|
@ -717,8 +717,10 @@ if (is_mac) {
|
||||||
output_name = electron_helper_name
|
output_name = electron_helper_name
|
||||||
deps = [
|
deps = [
|
||||||
":electron_framework+link",
|
":electron_framework+link",
|
||||||
"//sandbox/mac:seatbelt",
|
|
||||||
]
|
]
|
||||||
|
if (!is_mas_build) {
|
||||||
|
deps += [ "//sandbox/mac:seatbelt" ]
|
||||||
|
}
|
||||||
defines = [ "HELPER_EXECUTABLE" ]
|
defines = [ "HELPER_EXECUTABLE" ]
|
||||||
sources = filenames.app_sources
|
sources = filenames.app_sources
|
||||||
include_dirs = [ "." ]
|
include_dirs = [ "." ]
|
||||||
|
|
|
@ -43,9 +43,9 @@
|
||||||
#include "base/i18n/icu_util.h"
|
#include "base/i18n/icu_util.h"
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
|
|
||||||
#if defined(HELPER_EXECUTABLE)
|
#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
|
||||||
#include "sandbox/mac/seatbelt_exec.h" // nogncheck
|
#include "sandbox/mac/seatbelt_exec.h" // nogncheck
|
||||||
#endif // defined(HELPER_EXECUTABLE)
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HELPER_EXECUTABLE)
|
#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
|
||||||
uint32_t exec_path_size = 0;
|
uint32_t exec_path_size = 0;
|
||||||
int rv = _NSGetExecutablePath(NULL, &exec_path_size);
|
int rv = _NSGetExecutablePath(NULL, &exec_path_size);
|
||||||
if (rv != -1) {
|
if (rv != -1) {
|
||||||
|
@ -240,7 +240,7 @@ int main(int argc, char* argv[]) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif // defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
|
||||||
|
|
||||||
return AtomMain(argc, argv);
|
return AtomMain(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue