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

Issue 662103002: Reset child_process_launcher after notifying observers (Closed)

Created:
6 years, 2 months ago by Chirantan Ekbote
Modified:
6 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git/+/master
Project:
chromium
Visibility:
Public.

Description

Reset child_process_launcher after notifying observers Some observers need to know the ProcessHandle of the process that just exited. If they listen for NOTIFICATION_RENDERER_PROCESS_CLOSED, then they can get a valid handle but not if they register as a RenderProcessHostObserver because the child_process_launcher is reset before those observers are notified. Fix this by resetting the child_process_launcher after all the notifications have been sent out. BUG=none

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M content/browser/renderer_host/render_process_host_impl.cc View 2 chunks +1 line, -1 line 1 comment Download

Messages

Total messages: 7 (2 generated)
Chirantan Ekbote
Please take a look.
6 years, 2 months ago (2014-10-17 18:58:19 UTC) #2
no sievers
https://codereview.chromium.org/662103002/diff/1/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (left): https://codereview.chromium.org/662103002/diff/1/content/browser/renderer_host/render_process_host_impl.cc#oldcode1906 content/browser/renderer_host/render_process_host_impl.cc:1906: child_process_launcher_.reset(); This should already provide the old handle because ...
6 years, 2 months ago (2014-10-17 19:08:29 UTC) #3
Charlie Reis
Not LGTM. Nasko intentionally changed this behavior in https://codereview.chromium.org/613173004. I'd suggest coordinating with Nasko to ...
6 years, 2 months ago (2014-10-17 19:16:00 UTC) #5
nasko
Can you be more specific with which observers need this? What is broken that requires ...
6 years, 2 months ago (2014-10-17 19:53:40 UTC) #6
Chirantan Ekbote
6 years, 2 months ago (2014-10-17 20:18:00 UTC) #7
On 2014/10/17 19:53:40, nasko wrote:
> Can you be more specific with which observers need this? What is broken that
> requires this change?

No existing observers need this but a new one that I'm writing uses
ProcessHandles (crrev.com/656953002).  Looking at it again, I really only need
the handle at process creation time.  Everything else that I was using the
handle for can be changed to use the RenderProcessHost id instead.

I'm going to close this CL because I have a workaround but I still think the
current behavior is a little weird.  Maybe the ProcessHandle should also be
removed from RendererClosedDetails and everything that uses it should switch to
something else (like the RPH id).

Powered by Google App Engine
This is Rietveld 408576698