fix: make plugin helper executable unconditional (#36971)
This commit is contained in:
parent
c3f02d7df2
commit
cdb65c15a8
3 changed files with 2 additions and 13 deletions
|
@ -15,7 +15,6 @@
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "content/common/mac_helpers.h"
|
#include "content/common/mac_helpers.h"
|
||||||
#include "content/public/common/content_paths.h"
|
#include "content/public/common/content_paths.h"
|
||||||
#include "ppapi/buildflags/buildflags.h"
|
|
||||||
#include "shell/browser/mac/electron_application.h"
|
#include "shell/browser/mac/electron_application.h"
|
||||||
#include "shell/common/application_info.h"
|
#include "shell/common/application_info.h"
|
||||||
#include "shell/common/mac/main_application_bundle.h"
|
#include "shell/common/mac/main_application_bundle.h"
|
||||||
|
@ -41,11 +40,9 @@ base::FilePath GetHelperAppPath(const base::FilePath& frameworks_path,
|
||||||
} else if (base::EndsWith(path.value(), content::kMacHelperSuffix_gpu,
|
} else if (base::EndsWith(path.value(), content::kMacHelperSuffix_gpu,
|
||||||
base::CompareCase::SENSITIVE)) {
|
base::CompareCase::SENSITIVE)) {
|
||||||
helper_name += content::kMacHelperSuffix_gpu;
|
helper_name += content::kMacHelperSuffix_gpu;
|
||||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
|
||||||
} else if (base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
|
} else if (base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
|
||||||
base::CompareCase::SENSITIVE)) {
|
base::CompareCase::SENSITIVE)) {
|
||||||
helper_name += content::kMacHelperSuffix_plugin;
|
helper_name += content::kMacHelperSuffix_plugin;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return frameworks_path.Append(name + " " + helper_name + ".app")
|
return frameworks_path.Append(name + " " + helper_name + ".app")
|
||||||
|
|
|
@ -474,15 +474,10 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
|
||||||
content::ChildProcessHost::CHILD_RENDERER);
|
content::ChildProcessHost::CHILD_RENDERER);
|
||||||
auto gpu_child_path = content::ChildProcessHost::GetChildPath(
|
auto gpu_child_path = content::ChildProcessHost::GetChildPath(
|
||||||
content::ChildProcessHost::CHILD_GPU);
|
content::ChildProcessHost::CHILD_GPU);
|
||||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
|
||||||
auto plugin_child_path = content::ChildProcessHost::GetChildPath(
|
auto plugin_child_path = content::ChildProcessHost::GetChildPath(
|
||||||
content::ChildProcessHost::CHILD_PLUGIN);
|
content::ChildProcessHost::CHILD_PLUGIN);
|
||||||
#endif
|
if (program != renderer_child_path && program != gpu_child_path &&
|
||||||
if (program != renderer_child_path && program != gpu_child_path
|
program != plugin_child_path) {
|
||||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
|
||||||
&& program != plugin_child_path
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
child_path = content::ChildProcessHost::GetChildPath(
|
child_path = content::ChildProcessHost::GetChildPath(
|
||||||
content::ChildProcessHost::CHILD_NORMAL);
|
content::ChildProcessHost::CHILD_NORMAL);
|
||||||
CHECK_EQ(program, child_path)
|
CHECK_EQ(program, child_path)
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "base/path_service.h"
|
#include "base/path_service.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "content/common/mac_helpers.h"
|
#include "content/common/mac_helpers.h"
|
||||||
#include "ppapi/buildflags/buildflags.h"
|
|
||||||
|
|
||||||
namespace electron {
|
namespace electron {
|
||||||
|
|
||||||
|
@ -33,10 +32,8 @@ base::FilePath MainApplicationBundlePath() {
|
||||||
// Up to Contents.
|
// Up to Contents.
|
||||||
if (!HasMainProcessKey() &&
|
if (!HasMainProcessKey() &&
|
||||||
(base::EndsWith(path.value(), " Helper", base::CompareCase::SENSITIVE) ||
|
(base::EndsWith(path.value(), " Helper", base::CompareCase::SENSITIVE) ||
|
||||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
|
||||||
base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
|
base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
|
||||||
base::CompareCase::SENSITIVE) ||
|
base::CompareCase::SENSITIVE) ||
|
||||||
#endif
|
|
||||||
base::EndsWith(path.value(), content::kMacHelperSuffix_renderer,
|
base::EndsWith(path.value(), content::kMacHelperSuffix_renderer,
|
||||||
base::CompareCase::SENSITIVE) ||
|
base::CompareCase::SENSITIVE) ||
|
||||||
base::EndsWith(path.value(), content::kMacHelperSuffix_gpu,
|
base::EndsWith(path.value(), content::kMacHelperSuffix_gpu,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue