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

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

Issue 291173009: SandboxIPCProcess: make shutdown mechanism explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: content/browser/renderer_host/render_sandbox_host_linux.cc
diff --git a/content/browser/renderer_host/render_sandbox_host_linux.cc b/content/browser/renderer_host/render_sandbox_host_linux.cc
index 846ec26f2b76ee8f149b61b057038250649b52d8..0314ce1846836a3f1bf556faead40ad568861d48 100644
--- a/content/browser/renderer_host/render_sandbox_host_linux.cc
+++ b/content/browser/renderer_host/render_sandbox_host_linux.cc
@@ -70,12 +70,16 @@ void RenderSandboxHostLinux::Init() {
}
}
+bool RenderSandboxHostLinux::ShutdownIPCChannel() {
+ return IGNORE_EINTR(close(childs_lifeline_fd_)) == 0;
+}
+
RenderSandboxHostLinux::~RenderSandboxHostLinux() {
if (initialized_) {
+ if (!ShutdownIPCChannel())
+ LOG(ERROR) << "ShutdownIPCChannel failed";
if (IGNORE_EINTR(close(renderer_socket_)) < 0)
PLOG(ERROR) << "close";
- if (IGNORE_EINTR(close(childs_lifeline_fd_)) < 0)
- PLOG(ERROR) << "close";
}
}
« no previous file with comments | « content/browser/renderer_host/render_sandbox_host_linux.h ('k') | content/browser/renderer_host/sandbox_ipc_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698