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

Issue 666563005: Set up Mojo connection when RenderFrameHost is reused for new RenderFrame (Closed)

Created:
6 years, 2 months ago by blundell
Modified:
6 years, 1 month 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

Set up Mojo connection when RenderFrameHost is reused for new RenderFrame After a render process dies, the main RenderFrameHostImpl can be reused for a new RenderFrame in a new render process. In this case, the Mojo connection between the RFHI and the new RenderFrame was not being set up. This CL fixes the glitch and additionally future-proofs for the case where sub-frames can be reused as well: - When the FrameTree resets process state, it instructs the RFHI's affected to invalidate their Mojo connections. - When the RenderFrameHostManager creates a new RenderFrame for an RFHI, it instructs that RFHI to set up the Mojo connection if necessary. BUG=421069 TEST=Navigate to about://omnibox. Kill the tab via the Task Manager and reload. Observe that the page produces output upon submission of input. Committed: https://crrev.com/f06801aeac0f6ac2da15d621bee161d19bce96a3 Cr-Commit-Position: refs/heads/master@{#301329}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Initialize new_mojo_setup_needed_ #

Patch Set 4 : Beautify CL #

Patch Set 5 : Rebase #

Total comments: 7

Patch Set 6 : Response to reviews #

Patch Set 7 : Response to reviews #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -17 lines) Patch
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 2 chunks +9 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 3 chunks +31 lines, -15 lines 1 comment Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (4 generated)
blundell
Hi, This CL as it is feels essentially like a hack. What I'd like to ...
6 years, 2 months ago (2014-10-22 10:44:48 UTC) #2
blundell
On 2014/10/22 10:44:48, blundell wrote: > Hi, > > This CL as it is feels ...
6 years, 2 months ago (2014-10-22 10:51:44 UTC) #3
Sam McNally
> Sam, alternatively, was it ever considered to have the RenderFrame set up the > ...
6 years, 2 months ago (2014-10-22 11:25:05 UTC) #4
Charlie Reis
I'm out at an event today, so perhaps Nasko can take a look. Otherwise I'm ...
6 years, 2 months ago (2014-10-22 16:07:06 UTC) #6
nasko
On 2014/10/22 10:44:48, blundell wrote: > Hi, > > This CL as it is feels ...
6 years, 2 months ago (2014-10-22 20:21:00 UTC) #7
blundell
On 2014/10/22 20:21:00, nasko wrote: > On 2014/10/22 10:44:48, blundell wrote: > > Hi, > ...
6 years, 2 months ago (2014-10-22 20:29:58 UTC) #8
blundell
On 2014/10/22 20:21:00, nasko wrote: > On 2014/10/22 10:44:48, blundell wrote: > > Hi, > ...
6 years, 2 months ago (2014-10-22 20:29:58 UTC) #9
blundell
On 2014/10/22 20:21:00, nasko wrote: > On 2014/10/22 10:44:48, blundell wrote: > > Hi, > ...
6 years, 2 months ago (2014-10-22 20:31:04 UTC) #10
nasko
On 2014/10/22 20:31:04, blundell wrote: > On 2014/10/22 20:21:00, nasko wrote: > > On 2014/10/22 ...
6 years, 2 months ago (2014-10-22 20:41:09 UTC) #11
blundell
nasko@, thanks for the insights here! Realizing that this issue was only a concern for ...
6 years, 2 months ago (2014-10-23 11:56:00 UTC) #12
nasko
Couple of small things. https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_impl.h File content/browser/frame_host/render_frame_host_impl.h (right): https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_impl.h#newcode360 content/browser/frame_host/render_frame_host_impl.h:360: void SetUpMojoIfNeeded(); nit: I don't ...
6 years, 2 months ago (2014-10-23 15:59:09 UTC) #13
Charlie Reis
Hmm, I think I need to question the assumption about the main frame. Won't the ...
6 years, 2 months ago (2014-10-23 18:38:32 UTC) #14
blundell
Thanks! https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/frame_tree.cc File content/browser/frame_host/frame_tree.cc (right): https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/frame_tree.cc#newcode236 content/browser/frame_host/frame_tree.cc:236: GetMainFrame()->InvalidateMojoConnection(); On 2014/10/23 18:38:31, Charlie Reis wrote: > ...
6 years, 2 months ago (2014-10-24 14:42:54 UTC) #15
blundell
Thanks! https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_manager.cc#newcode191 content/browser/frame_host/render_frame_host_manager.cc:191: dest_render_frame_host->SetUpMojoIfNeeded(); On 2014/10/23 15:59:08, nasko wrote: > This ...
6 years, 2 months ago (2014-10-24 14:42:55 UTC) #16
nasko
https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_manager.cc#newcode191 content/browser/frame_host/render_frame_host_manager.cc:191: dest_render_frame_host->SetUpMojoIfNeeded(); On 2014/10/24 14:42:55, blundell wrote: > On 2014/10/23 ...
6 years, 2 months ago (2014-10-24 16:13:11 UTC) #17
Charlie Reis
Thanks! LGTM. https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/666563005/diff/80001/content/browser/frame_host/render_frame_host_manager.cc#newcode191 content/browser/frame_host/render_frame_host_manager.cc:191: dest_render_frame_host->SetUpMojoIfNeeded(); On 2014/10/24 16:13:11, nasko wrote: > ...
6 years, 2 months ago (2014-10-24 16:30:45 UTC) #18
blundell
Thanks! Comment added.
6 years, 1 month ago (2014-10-27 08:30:29 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/666563005/120001
6 years, 1 month ago (2014-10-27 08:30:56 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years, 1 month ago (2014-10-27 09:21:25 UTC) #22
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/f06801aeac0f6ac2da15d621bee161d19bce96a3 Cr-Commit-Position: refs/heads/master@{#301329}
6 years, 1 month ago (2014-10-27 09:21:59 UTC) #23
qsr
6 years, 1 month ago (2014-10-27 11:45:41 UTC) #25
Message was sent while issue was closed.
https://codereview.chromium.org/666563005/diff/120001/content/browser/frame_h...
File content/browser/frame_host/render_frame_host_impl.cc (right):

https://codereview.chromium.org/666563005/diff/120001/content/browser/frame_h...
content/browser/frame_host/render_frame_host_impl.cc:1457:
service_registry_android_.reset();
This is not that big a deal, but this should be resetted before the other one,
as it does have a reference to the service_registry. If it were to use it in its
destructor, this will break.

Powered by Google App Engine
This is Rietveld 408576698