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

Issue 6927014: Avoid exiting the renderer process if it has a pending render view. (Closed)

Created:
9 years, 7 months ago by Charlie Reis
Modified:
9 years, 7 months ago
Reviewers:
jam, Matt Perry
CC:
chromium-reviews, Avi (use Gerrit), jam, brettw-cc_chromium.org, darin (slow to review)
Visibility:
Public.

Description

Avoid exiting the renderer process if it has a pending render view. This addresses an issue for a future CL when we switch to swapping RenderViewHosts in and out, rather than throwing them away each time. BUG=65953 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85054

Patch Set 1 #

Patch Set 2 : Fix pre-render issue. #

Total comments: 4

Patch Set 3 : Address feedback. #

Total comments: 10

Patch Set 4 : More feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -1 line) Patch
M content/browser/renderer_host/browser_render_process_host.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/browser_render_process_host.cc View 1 2 3 3 chunks +20 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host.h View 1 2 3 2 chunks +11 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host.cc View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M content/browser/tab_contents/render_view_host_manager.h View 1 2 3 4 chunks +12 lines, -1 line 0 comments Download
M content/browser/tab_contents/render_view_host_manager.cc View 1 2 3 6 chunks +33 lines, -0 lines 0 comments Download
M content/common/notification_type.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Charlie Reis
Thanks for the comments on http://codereview.chromium.org/6909016/. I've switched to using the ShutdownRequest message in BrowserRenderProcessHost ...
9 years, 7 months ago (2011-05-04 16:48:16 UTC) #1
jam
whoever reviewd the renderviewhostmanager changes last time should review the changes to that file, since ...
9 years, 7 months ago (2011-05-06 17:45:11 UTC) #2
Charlie Reis
On 2011/05/06 17:45:11, John Abd-El-Malek wrote: > whoever reviewd the renderviewhostmanager changes last time should ...
9 years, 7 months ago (2011-05-10 00:57:03 UTC) #3
Matt Perry
LGTM http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/render_process_host.h File content/browser/renderer_host/render_process_host.h (right): http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/render_process_host.h#newcode196 content/browser/renderer_host/render_process_host.h:196: virtual void AddPendingView() = 0; since this is ...
9 years, 7 months ago (2011-05-10 01:14:02 UTC) #4
Matt Perry
http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/browser_render_process_host.cc File content/browser/renderer_host/browser_render_process_host.cc (right): http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/browser_render_process_host.cc#newcode473 content/browser/renderer_host/browser_render_process_host.cc:473: pending_views_--; does this need to send a shutdown if ...
9 years, 7 months ago (2011-05-10 01:14:50 UTC) #5
Charlie Reis
http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/browser_render_process_host.cc File content/browser/renderer_host/browser_render_process_host.cc (right): http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/browser_render_process_host.cc#newcode473 content/browser/renderer_host/browser_render_process_host.cc:473: pending_views_--; On 2011/05/10 01:14:50, Matt Perry wrote: > does ...
9 years, 7 months ago (2011-05-10 01:33:09 UTC) #6
jam
lgtm http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/render_process_host.h File content/browser/renderer_host/render_process_host.h (right): http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_host/render_process_host.h#newcode196 content/browser/renderer_host/render_process_host.h:196: virtual void AddPendingView() = 0; On 2011/05/10 01:33:09, ...
9 years, 7 months ago (2011-05-10 04:45:18 UTC) #7
Charlie Reis
9 years, 7 months ago (2011-05-10 18:42:19 UTC) #8
Thanks-- I've fixed the remaining issues you mentioned.  Just waiting for the
try servers.

http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_hos...
File content/browser/renderer_host/render_process_host.h (right):

http://codereview.chromium.org/6927014/diff/6001/content/browser/renderer_hos...
content/browser/renderer_host/render_process_host.h:196: virtual void
AddPendingView() = 0;
On 2011/05/10 04:45:18, John Abd-El-Malek wrote:
> On 2011/05/10 01:33:09, creis wrote:
> > On 2011/05/10 01:14:02, Matt Perry wrote:
> > > since this is an interface on the class already, why not just make it
> > > non-virtual and implement it here? The impl doesn't seem to do anything
> > specific
> > > to chrome.
> > 
> > Actually, I'm a little unclear on the difference between RenderProcessHost
and
> > BrowserRenderProcessHost, since both are in content, not chrome.  Right now,
> the
> > test version in MockRPH doesn't care about this, so that's the difference
> > between the two.
> > 
> > John, if you agree that we should move the implementation here, I'm happy to
> do
> > that.
> 
> RenderProcessHost was added so that we can have a mock object that implements
> the bare interface and use it in tests instead of BrowserRenderProcessHost,
> which actually launches processes etc.  I don't have strong opinions on where
> the implementation goes.

Ok.  Since there's no harm in having these counters in the tests (and possibly
some value), I've moved the implementation to RenderProcessHost as Matt
suggests.

http://codereview.chromium.org/6927014/diff/6001/content/browser/tab_contents...
File content/browser/tab_contents/render_view_host_manager.h (right):

http://codereview.chromium.org/6927014/diff/6001/content/browser/tab_contents...
content/browser/tab_contents/render_view_host_manager.h:118: //
NotificationObserver.
On 2011/05/10 04:45:18, John Abd-El-Malek wrote:
> nit: the usual style is to add the inherited methods in order that the
> interfaces are listed.  so this should go at line 181

Done.

Powered by Google App Engine
This is Rietveld 408576698