mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: NODE_OPTIONS parsing for child processes on macOS (#46209)
* fix: NODE_OPTIONS parsing for child processes on macOS * chore: temporarily disable test * chore: apply review feedback * chore: fix build
This commit is contained in:
@@ -90,7 +90,10 @@
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "base/no_destructor.h"
|
||||
#include "content/browser/mac_helpers.h"
|
||||
#include "shell/browser/ui/cocoa/electron_bundle_mover.h"
|
||||
#include "shell/common/process_util.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
@@ -901,6 +904,21 @@ bool App::IsPackaged() {
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
return base_name != FILE_PATH_LITERAL("electron.exe");
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
static const base::NoDestructor<std::string> default_helper(
|
||||
"electron helper" +
|
||||
base::ToLowerASCII(content::kMacHelperSuffix_default));
|
||||
static const base::NoDestructor<std::string> renderer_helper(
|
||||
"electron helper" +
|
||||
base::ToLowerASCII(content::kMacHelperSuffix_renderer));
|
||||
static const base::NoDestructor<std::string> plugin_helper(
|
||||
"electron helper" + base::ToLowerASCII(content::kMacHelperSuffix_plugin));
|
||||
if (IsRendererProcess()) {
|
||||
return base_name != *renderer_helper;
|
||||
} else if (IsUtilityProcess()) {
|
||||
return base_name != *default_helper && base_name != *plugin_helper;
|
||||
}
|
||||
return base_name != FILE_PATH_LITERAL("electron");
|
||||
#else
|
||||
return base_name != FILE_PATH_LITERAL("electron");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user