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

Issue 2446543004: Fix RPHI message queueing during process death (Closed)

Created:
4 years, 1 month ago by Ken Rockot(use gerrit already)
Modified:
4 years, 1 month ago
Reviewers:
jam
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix RPHI message queueing during process death Please see https://crbug.com/658759 for more context. The TL;DR is I broke some subtle behavior in https://crrev.com/425358, and this fixes it. Here's what happens in ProcessDied, in this order: 1. We reset channel_ so that future Send() calls throw away messages. Note that at this point, any Channel-associated interfaces remain valid but are intentionally dropping all messages as well. 2. We fire various notifications about the death of the process. 3. We re-initialize channel_, allowing subsequent Send() calls and associated interface calls to be queued and eventually delivered to the new process once it's restarted. The subtlety here is that if a RenderViewHostImpl is created at any point during step (2) above, we must re-initialize channel_ and start allowing messages to be queued on it. Formerly this was accomplished by EnableSendQueue() setting is_initialized_ to false. This CL establishes the same behavior by restoring EnableSendQueue() to essentially have the same effect by re- initializing the channel earlier. This is likely not the precise behavior we want, since it seems like this can cause messages intended for the old process to end up getting delivered to the new process, but it is the behavior we already had in place before https://crrev.com/425358 and we apparently rely on it. BUG=658759 Committed: https://crrev.com/8a1482f49a54148bdb239261e7582555c8984663 Cr-Commit-Position: refs/heads/master@{#427257}

Patch Set 1 #

Total comments: 2

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -21 lines) Patch
M content/browser/renderer_host/render_process_host_impl.h View 1 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 6 chunks +23 lines, -21 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (18 generated)
Ken Rockot(use gerrit already)
4 years, 1 month ago (2016-10-24 21:13:57 UTC) #8
jam
lgtm maybe keep old name of EnableSendQueue for consistency (i.e. mostly for code archeology) https://codereview.chromium.org/2446543004/diff/1/content/browser/renderer_host/render_process_host_impl.h ...
4 years, 1 month ago (2016-10-25 00:22:55 UTC) #12
Ken Rockot(use gerrit already)
OK, EnableSendQueue() it is. https://codereview.chromium.org/2446543004/diff/1/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/2446543004/diff/1/content/browser/renderer_host/render_process_host_impl.h#newcode324 content/browser/renderer_host/render_process_host_impl.h:324: void ResetChannelProxy(); On 2016/10/25 at ...
4 years, 1 month ago (2016-10-25 01:43:22 UTC) #16
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/2446543004/20001
4 years, 1 month ago (2016-10-25 01:43:30 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-10-25 02:56:42 UTC) #22
commit-bot: I haz the power
4 years, 1 month ago (2016-10-25 02:59:06 UTC) #24
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/8a1482f49a54148bdb239261e7582555c8984663
Cr-Commit-Position: refs/heads/master@{#427257}

Powered by Google App Engine
This is Rietveld 408576698