fix: NOTREACHED in content::ChildProcessHost::GetChildPath when enable_plugins=false (#25525)
This commit is contained in:
parent
efd003d277
commit
e50d6e47c4
5 changed files with 11 additions and 6 deletions
|
@ -701,10 +701,15 @@ 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);
|
||||||
if (program != renderer_child_path && program != gpu_child_path &&
|
#endif
|
||||||
program != plugin_child_path) {
|
if (program != renderer_child_path && program != gpu_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)
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
#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"
|
#include "extensions/common/constants.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
#include "shell/browser/extensions/electron_extension_loader.h"
|
#include "shell/browser/extensions/electron_extension_loader.h"
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||||
#include "chrome/browser/pdf/pdf_extension_util.h"
|
#include "chrome/browser/pdf/pdf_extension_util.h" // nogncheck
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using content::BrowserContext;
|
using content::BrowserContext;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include "shell/browser/extensions/electron_messaging_delegate.h"
|
#include "shell/browser/extensions/electron_messaging_delegate.h"
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
#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"
|
#include "shell/browser/electron_pdf_web_contents_helper_client.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
#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"
|
#include "shell/common/electron_constants.h"
|
||||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue