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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1643533006: Use a single, generic, global zygote to temporarily resolve perf regressions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused ppapi header Created 4 years, 11 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 | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index e5a1a986811b3e28f6a286d0cd0140bf9a2880c2..2ce52592e2341a4ea50c8833bef7ca2d9b273763 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -409,7 +409,7 @@ class RendererSandboxedProcessLauncherDelegate
browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
if (!renderer_prefix.empty())
return nullptr;
- return &g_render_zygote;
+ return GetGenericZygote();
}
#endif // !defined(OS_MACOSX) && !defined(OS_ANDROID)
base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }
@@ -545,12 +545,11 @@ void RenderProcessHost::SetMaxRendererProcessCount(size_t count) {
// static
void RenderProcessHostImpl::EarlyZygoteLaunch() {
DCHECK(!g_render_zygote);
- g_render_zygote = CreateZygote();
// TODO(kerrnel): Investigate doing this without the ZygoteHostImpl as a
// proxy. It is currently done this way due to concerns about race
// conditions.
ZygoteHostImpl::GetInstance()->SetRendererSandboxStatus(
- g_render_zygote->GetSandboxStatus());
+ (*GetGenericZygote())->GetSandboxStatus());
}
#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/browser/utility_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698