Skip to content

Commit

Permalink
fix: disable Chromium v2 sandbox in MAS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
miniak committed Feb 13, 2019
1 parent cd9bf72 commit 18fb6b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions BUILD.gn
Expand Up @@ -716,9 +716,11 @@ if (is_mac) {
output_name = electron_helper_name
deps = [
":electron_framework+link",
"//sandbox/mac:seatbelt",
]
defines = [ "HELPER_EXECUTABLE" ]
if (!is_mas_build) {
deps += [ "//sandbox/mac:seatbelt" ]
defines = [ "ENABLE_SEATBELT" ]
}
sources = filenames.app_sources
include_dirs = [ "." ]
info_plist = "atom/renderer/resources/mac/Info.plist"
Expand Down
8 changes: 4 additions & 4 deletions atom/app/atom_main.cc
Expand Up @@ -43,9 +43,9 @@
#include "base/i18n/icu_util.h"
#include "electron/buildflags/buildflags.h"

#if defined(HELPER_EXECUTABLE)
#if defined(ENABLE_SEATBELT)
#include "sandbox/mac/seatbelt_exec.h" // nogncheck
#endif // defined(HELPER_EXECUTABLE)
#endif // defined(ENABLE_SEATBELT)

namespace {

Expand Down Expand Up @@ -213,7 +213,7 @@ int main(int argc, char* argv[]) {
}
#endif

#if defined(HELPER_EXECUTABLE)
#if defined(ENABLE_SEATBELT)
uint32_t exec_path_size = 0;
int rv = _NSGetExecutablePath(NULL, &exec_path_size);
if (rv != -1) {
Expand All @@ -240,7 +240,7 @@ int main(int argc, char* argv[]) {
abort();
}
}
#endif
#endif // defined(ENABLE_SEATBELT)

return AtomMain(argc, argv);
}
Expand Down

0 comments on commit 18fb6b2

Please sign in to comment.