зеркало из https://github.com/electron/electron.git
fix: make plugin helper executable unconditional (#36971)
This commit is contained in:
Родитель
c3f02d7df2
Коммит
cdb65c15a8
|
@ -15,7 +15,6 @@
|
|||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "content/common/mac_helpers.h"
|
||||
#include "content/public/common/content_paths.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
#include "shell/browser/mac/electron_application.h"
|
||||
#include "shell/common/application_info.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,
|
||||
base::CompareCase::SENSITIVE)) {
|
||||
helper_name += content::kMacHelperSuffix_gpu;
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
} else if (base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
|
||||
base::CompareCase::SENSITIVE)) {
|
||||
helper_name += content::kMacHelperSuffix_plugin;
|
||||
#endif
|
||||
}
|
||||
|
||||
return frameworks_path.Append(name + " " + helper_name + ".app")
|
||||
|
|
|
@ -474,15 +474,10 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
|
|||
content::ChildProcessHost::CHILD_RENDERER);
|
||||
auto gpu_child_path = content::ChildProcessHost::GetChildPath(
|
||||
content::ChildProcessHost::CHILD_GPU);
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
auto plugin_child_path = content::ChildProcessHost::GetChildPath(
|
||||
content::ChildProcessHost::CHILD_PLUGIN);
|
||||
#endif
|
||||
if (program != renderer_child_path && program != gpu_child_path
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
&& program != plugin_child_path
|
||||
#endif
|
||||
) {
|
||||
if (program != renderer_child_path && program != gpu_child_path &&
|
||||
program != plugin_child_path) {
|
||||
child_path = content::ChildProcessHost::GetChildPath(
|
||||
content::ChildProcessHost::CHILD_NORMAL);
|
||||
CHECK_EQ(program, child_path)
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "base/path_service.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "content/common/mac_helpers.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -33,10 +32,8 @@ 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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче