fix: build when some buildflags are disabled (#23307)

This commit is contained in:
Robo 2020-04-28 23:16:10 -07:00 committed by GitHub
parent 3584665a8f
commit ec7942e8b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 82 additions and 44 deletions

View file

@ -11,6 +11,7 @@
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "content/common/mac_helpers.h"
#include "ppapi/buildflags/buildflags.h"
namespace electron {
@ -32,11 +33,13 @@ base::FilePath MainApplicationBundlePath() {
// Up to Contents.
if (!HasMainProcessKey() &&
(base::EndsWith(path.value(), " Helper", base::CompareCase::SENSITIVE) ||
#if BUILDFLAG(ENABLE_PLUGINS)
base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
base::CompareCase::SENSITIVE) ||
#endif
base::EndsWith(path.value(), content::kMacHelperSuffix_renderer,
base::CompareCase::SENSITIVE) ||
base::EndsWith(path.value(), content::kMacHelperSuffix_gpu,
base::CompareCase::SENSITIVE) ||
base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
base::CompareCase::SENSITIVE))) {
// The running executable is the helper. Go up five steps:
// Contents/Frameworks/Helper.app/Contents/MacOS/Helper