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

Unified Diff: content/common/child_process_host_impl.cc

Issue 2058653002: Ignore kill termination status when shutting down a child process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/common/child_process_host_impl.h ('k') | content/public/common/child_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process_host_impl.cc
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 909a3d6ee256f974a39ac1416e44acd43c121698..b7b6c0a775a75ba3b88dfd717fb9c3767a2d99b7 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -85,7 +85,8 @@ base::FilePath ChildProcessHost::GetChildPath(int flags) {
ChildProcessHostImpl::ChildProcessHostImpl(ChildProcessHostDelegate* delegate)
: delegate_(delegate),
- opening_channel_(false) {
+ opening_channel_(false),
+ is_shutting_down_(false) {
#if defined(OS_WIN)
AddFilter(new FontCacheDispatcher());
#endif
@@ -130,6 +131,11 @@ void ChildProcessHostImpl::AddFilter(IPC::MessageFilter* filter) {
void ChildProcessHostImpl::ForceShutdown() {
Send(new ChildProcessMsg_Shutdown());
+ is_shutting_down_ = true;
+}
+
+bool ChildProcessHostImpl::IsShuttingDown() {
+ return is_shutting_down_;
}
std::string ChildProcessHostImpl::CreateChannelMojo(
@@ -330,8 +336,10 @@ void ChildProcessHostImpl::OnAllocateSharedMemory(
}
void ChildProcessHostImpl::OnShutdownRequest() {
- if (delegate_->CanShutdown())
+ if (delegate_->CanShutdown()) {
Send(new ChildProcessMsg_Shutdown());
+ is_shutting_down_ = true;
+ }
}
void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer(
« no previous file with comments | « content/common/child_process_host_impl.h ('k') | content/public/common/child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698