Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: NOTREACHED in content::ChildProcessHost::GetChildPath when enable_plugins=false #25551

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions shell/browser/electron_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,10 +700,15 @@ 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);
if (program != renderer_child_path && program != gpu_child_path &&
program != plugin_child_path) {
#endif
if (program != renderer_child_path && program != gpu_child_path
#if BUILDFLAG(ENABLE_PLUGINS)
&& program != plugin_child_path
#endif
) {
child_path = content::ChildProcessHost::GetChildPath(
content::ChildProcessHost::CHILD_NORMAL);
CHECK_EQ(program, child_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "electron/buildflags/buildflags.h"

#if BUILDFLAG(ENABLE_PDF_VIEWER)
#include "chrome/browser/pdf/pdf_extension_util.h"
#include "chrome/browser/pdf/pdf_extension_util.h" // nogncheck
#include "extensions/common/constants.h"
#endif
namespace extensions {
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/extensions/electron_extension_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "shell/browser/extensions/electron_extension_loader.h"

#if BUILDFLAG(ENABLE_PDF_VIEWER)
#include "chrome/browser/pdf/pdf_extension_util.h"
#include "chrome/browser/pdf/pdf_extension_util.h" // nogncheck
#endif

using content::BrowserContext;
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/extensions/electron_extensions_api_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "shell/browser/extensions/electron_messaging_delegate.h"

#if BUILDFLAG(ENABLE_PDF_VIEWER)
#include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/pdf/browser/pdf_web_contents_helper.h" // nogncheck
#include "shell/browser/electron_pdf_web_contents_helper_client.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion shell/renderer/renderer_client_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#endif

#if BUILDFLAG(ENABLE_PDF_VIEWER)
#include "chrome/renderer/pepper/chrome_pdf_print_client.h"
#include "chrome/renderer/pepper/chrome_pdf_print_client.h" // nogncheck
#include "shell/common/electron_constants.h"
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)

Expand Down