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

Issue 2411093002: Always keep a ChannelProxy alive in RenderProcessHostImpl (Closed)

Created:
4 years, 2 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 2 months ago
Reviewers:
ncarter (slow)
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Always keep a ChannelProxy alive in RenderProcessHostImpl RPHI currently keeps |channel_| around only as long as the remote process is alive. In order to allow RPHI::Send to work even without a process, it queues messages internally when |channel_| is null. Channel-associated mojom interfaces may only be acquired once a Channel exists, and so any messages sent before Channel creation can't be moved to Channel-associated mojom interfaces at the moment. This CL changes RPHI so that it always has a ChannelProxy instance in |channel_| as long as Cleanup() hasn't run to completion yet (at that point, the RPHI is about to be discarded anyway.) The pre-Init queueing behavior is satisfied here by pausing the Channel immediately on construction and then unpausing briefly where it was previously created. ProcessDied() re-initializes the ChannelProxy to prepare for potential RPHI reuse, rather than simply resetting it. Additionally this removes the EnableSendQueue() call on RPH, as it is either redundant or incorrect - it merely set |is_initialized_| to false. This could only be reset to true by Init(), and only when |channel_| was null. The only possible net effect of this would have been to pause the channel indefinitely (which is wrong and unlikely), or to pause the channel during initialization (which is redundant because it's already effectively paused until Init()). BUG=612500 Committed: https://crrev.com/cd2de7ccd49ab1fa092526488761f0c855688654 Cr-Commit-Position: refs/heads/master@{#425358}

Patch Set 1 #

Total comments: 6

Patch Set 2 : . #

Total comments: 1

Patch Set 3 : . #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -134 lines) Patch
M content/browser/renderer_host/render_process_host_impl.h View 1 2 4 chunks +8 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 15 chunks +120 lines, -116 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/public/browser/render_process_host.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 chunk +0 lines, -3 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 61 (49 generated)
Ken Rockot(use gerrit already)
Please take a look. I believe I've gotten this right, but of course there might ...
4 years, 2 months ago (2016-10-11 23:52:18 UTC) #8
Ken Rockot(use gerrit already)
friendly ping!
4 years, 2 months ago (2016-10-12 23:18:06 UTC) #22
ncarter (slow)
https://codereview.chromium.org/2411093002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (left): https://codereview.chromium.org/2411093002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc#oldcode845 content/browser/renderer_host/render_process_host_impl.cc:845: is_initialized_ = false; I'd never thought deeply about this ...
4 years, 2 months ago (2016-10-12 23:32:42 UTC) #23
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2411093002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (left): https://codereview.chromium.org/2411093002/diff/60001/content/browser/renderer_host/render_process_host_impl.cc#oldcode845 content/browser/renderer_host/render_process_host_impl.cc:845: is_initialized_ = false; On 2016/10/12 at 23:32:42, ncarter wrote: ...
4 years, 2 months ago (2016-10-12 23:56:05 UTC) #24
Ken Rockot(use gerrit already)
FYI and much to my bewilderment, unit_tests are consistently failing on Android bots with this ...
4 years, 2 months ago (2016-10-13 14:17:06 UTC) #41
ncarter (slow)
4 years, 2 months ago (2016-10-13 18:42:38 UTC) #48
Ken Rockot(use gerrit already)
On 2016/10/13 at 18:42:38, nick wrote: > Not sure if you intended to post a ...
4 years, 2 months ago (2016-10-13 20:05:51 UTC) #49
ncarter (slow)
lgtm assuming you fix the android issues and back out the debug code thanks for ...
4 years, 2 months ago (2016-10-13 21:40:29 UTC) #50
ncarter (slow)
ps3 lgtm as-is
4 years, 2 months ago (2016-10-13 21:41:40 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2411093002/200001
4 years, 2 months ago (2016-10-14 16:40:30 UTC) #58
commit-bot: I haz the power
Committed patchset #4 (id:200001)
4 years, 2 months ago (2016-10-14 16:47:59 UTC) #59
commit-bot: I haz the power
4 years, 2 months ago (2016-10-14 16:50:19 UTC) #61
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/cd2de7ccd49ab1fa092526488761f0c855688654
Cr-Commit-Position: refs/heads/master@{#425358}

Powered by Google App Engine
This is Rietveld 408576698