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 Review-Url: https://codereview.chromium.org/2446543004 Cr-Commit-Position: refs/heads/master@{#427257}
Showing
Please register or sign in to comment