Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(989)

Unified Diff: content/browser/browser_main_loop.cc

Issue 2827783003: Initialize RenderSandboxHostLinux in --no-zygote mode to not crash. (Closed)
Patch Set: Disable the test under TSan. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/zygote/zygote_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 0dc52fcaf88e98e2dcf3b4a4858b357f8210f0ad..5021cd5c45c38f59493fbb778338da8fff3082a0 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -217,14 +217,17 @@ namespace {
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
void SetupSandbox(const base::CommandLine& parsed_command_line) {
TRACE_EVENT0("startup", "SetupSandbox");
+ // RenderSandboxHostLinux needs to be initialized even if the sandbox and
+ // zygote are both disabled. It initializes the renderer socket.
+ RenderSandboxHostLinux::GetInstance()->Init();
+
if (parsed_command_line.HasSwitch(switches::kNoZygote)) {
CHECK(parsed_command_line.HasSwitch(switches::kNoSandbox))
<< "--no-sandbox should be used together with --no--zygote";
return;
}
- // Tickle the sandbox host and zygote host so they fork now.
- RenderSandboxHostLinux::GetInstance()->Init();
+ // Tickle the zygote host so it forks now.
ZygoteHostImpl::GetInstance()->Init(parsed_command_line);
*GetGenericZygote() = CreateZygote();
RenderProcessHostImpl::EarlyZygoteLaunch();
« no previous file with comments | « no previous file | content/zygote/zygote_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698