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

Issue 2058653002: Ignore kill termination status when shutting down a child process. (Closed)

Created:
4 years, 6 months ago by Anand Mistry (off Chromium)
Modified:
4 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews, extensions-reviews_chromium.org, Lei Zhang, tommycli, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ignore kill termination status when shutting down a child process. Child process shutdown assumes the child holds onto the IPC pipe until it exits. This implies that when the browser notices the IPC disconnection, the child is dead. When using ChannelMojo, this isn't true because Mojo performs an orderly shutdown before the child exits. BUG=618121

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -7 lines) Patch
M chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc View 1 chunk +1 line, -4 lines 0 comments Download
M content/browser/browser_child_process_host_impl.cc View 2 chunks +13 lines, -1 line 0 comments Download
M content/common/child_process_host_impl.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/common/child_process_host_impl.cc View 3 chunks +10 lines, -2 lines 0 comments Download
M content/public/common/child_process_host.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Anand Mistry (off Chromium)
jam: I picked you as reviewer because you wrote this very relevant comment in https://codereview.chromium.org/155944: ...
4 years, 6 months ago (2016-06-10 01:43:13 UTC) #2
jam
On 2016/06/10 01:43:13, Anand Mistry wrote: > jam: I picked you as reviewer because you ...
4 years, 6 months ago (2016-06-10 16:45:53 UTC) #3
jam
4 years, 6 months ago (2016-06-13 19:13:48 UTC) #4
On 2016/06/10 16:45:53, jam wrote:
> On 2016/06/10 01:43:13, Anand Mistry wrote:
> > jam: I picked you as reviewer because you wrote this very relevant comment
in
> > https://codereview.chromium.org/155944:
> > // The ChannelProxy object caches a pointer to the IPC thread, so need to
> > // reset it as it's not guaranteed to outlive this object.
> > // NOTE: this also has the side-effect of not closing the main IPC channel
to
> > // the browser process.  This is needed because this is the signal that the
> > // browser uses to know that this process has died, so we need it to be
alive
> > // until this process is shut down, and the OS closes the handle
> > // automatically.  We used to watch the object handle on Windows to do this,
> > // but it wasn't possible to do so on POSIX.
> >
>
https://cs.chromium.org/chromium/src/content/child/child_thread_impl.cc?sq=pa...
> > 
> > A comment which is not true under ChannelMojo, and this CL tries to address.
> 
> Re "orderly shutdown", it's been helpful to leak the OS pipe so that it's only
> destructed when the process shuts down. Why not maintain the behavior here?
> 
> Otherwise we will need a handshake for new process types later (i.e. processes
> just running mojo apps).

btw just thought I'd note: the linked cl didn't introduce the behavior, it just
maintained it after switching the threads (previously the IO thread was the
primordial thread).

Powered by Google App Engine
This is Rietveld 408576698