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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 1532423003: Have each SandboxedProcessLauncherDelegate maintain a zygote. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fetch sandbox status Created 5 years 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
Index: content/browser/utility_process_host_impl.cc
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index 4cd0cd19e9318a0a549a5ff4e376538fb49b50c1..d34e0883498eb1a62ebeb901a5e949a978bc59d0 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -86,8 +86,12 @@ class UtilitySandboxedProcessLauncherDelegate
#elif defined(OS_POSIX)
- bool ShouldUseZygote() override {
- return !no_sandbox_ && exposed_dir_.empty();
+ ZygoteHandle* GetZygote() override {
+ if (!no_sandbox_ && exposed_dir_.empty()) {
+ static ZygoteHandle zygote;
+ return &zygote;
+ }
+ return nullptr;
}
base::EnvironmentMap GetEnvironment() override { return env_; }
base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }

Powered by Google App Engine
This is Rietveld 408576698