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

Issue 753173002: Preparation steps for adding speculative renderer creation. (Closed)

Created:
6 years ago by carlosk
Modified:
6 years ago
Reviewers:
Charlie Reis, clamy, nasko
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, ajwong+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Preparation steps for adding speculative renderer creation. Generalized the RenderFrameHost and WebUI creation methods to allow for the following step of speculatively creating renderers in browser side navigations for the PlzNavigate project (spliting off of crrev.com/701953006). BUG=376094 TBR=creis@chromium.org Committed: https://crrev.com/37f79379aa9254a5070b8b276486e2842c4b1001 Cr-Commit-Position: refs/heads/master@{#305989}

Patch Set 1 #

Patch Set 2 : Minor missing things. #

Total comments: 14

Patch Set 3 : Address CR comments and makes a RFHM method private. #

Total comments: 13

Patch Set 4 : TODO comments removed and new lines added. #

Total comments: 20

Patch Set 5 : Address a new round of CR comments: renames, comments and minor changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -104 lines) Patch
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 7 chunks +40 lines, -18 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 12 chunks +95 lines, -74 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 2 chunks +17 lines, -9 lines 0 comments Download

Messages

Total messages: 17 (2 generated)
carlosk
Dear reviewers, PTAL. This is the split off of crrev.com/701953006 as previously discussed. It provides ...
6 years ago (2014-11-24 15:42:59 UTC) #2
nasko
Some initial coments. https://codereview.chromium.org/753173002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/753173002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc#newcode1026 content/browser/frame_host/render_frame_host_manager.cc:1026: if (delegate_->IsHidden()) nit: empty line before ...
6 years ago (2014-11-24 17:00:28 UTC) #3
carlosk
Thanks nasko@. Replied to your comments and added a patch. After discussing with clamy@ I ...
6 years ago (2014-11-24 18:15:30 UTC) #4
nasko
Another round of comments. https://codereview.chromium.org/753173002/diff/40001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/753173002/diff/40001/content/browser/frame_host/render_frame_host_manager.cc#newcode562 content/browser/frame_host/render_frame_host_manager.cc:562: void RenderFrameHostManager::DiscardRenderFrameHost( Now that I ...
6 years ago (2014-11-24 23:59:08 UTC) #5
carlosk
Thanks for this new round. https://codereview.chromium.org/753173002/diff/40001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/753173002/diff/40001/content/browser/frame_host/render_frame_host_manager.cc#newcode562 content/browser/frame_host/render_frame_host_manager.cc:562: void RenderFrameHostManager::DiscardRenderFrameHost( On 2014/11/24 ...
6 years ago (2014-11-25 10:54:31 UTC) #6
clamy
Thanks! Lgtm
6 years ago (2014-11-25 16:18:35 UTC) #7
nasko
I think it is unfortunate that the code becomes as complex as it is and ...
6 years ago (2014-11-26 00:13:03 UTC) #8
Charlie Reis
I'm taking a look now; please wait for my review. (Sorry for the delay!) https://codereview.chromium.org/753173002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc ...
6 years ago (2014-11-26 00:42:54 UTC) #9
Charlie Reis
On 2014/11/26 00:42:54, Charlie Reis (OOO until Dec 1) wrote: > I'm taking a look ...
6 years ago (2014-11-26 00:45:51 UTC) #10
Charlie Reis
Ok, here's the rest of the comments. Thanks for splitting all of this out into ...
6 years ago (2014-11-26 01:06:40 UTC) #11
carlosk
Thanks once more. On 2014/11/26 00:13:03, nasko (Out until Dec 08) wrote: > I think ...
6 years ago (2014-11-27 11:02:44 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/753173002/80001
6 years ago (2014-11-27 13:36:33 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years ago (2014-11-27 15:08:36 UTC) #15
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/37f79379aa9254a5070b8b276486e2842c4b1001 Cr-Commit-Position: refs/heads/master@{#305989}
6 years ago (2014-11-27 15:09:15 UTC) #16
Charlie Reis
6 years ago (2014-12-01 20:12:47 UTC) #17
Message was sent while issue was closed.
Thanks.  Still LGTM.

https://codereview.chromium.org/753173002/diff/60001/content/browser/frame_ho...
File content/browser/frame_host/render_frame_host_manager.cc (right):

https://codereview.chromium.org/753173002/diff/60001/content/browser/frame_ho...
content/browser/frame_host/render_frame_host_manager.cc:577:
render_frame_host->SwapOut(proxy);
On 2014/11/27 11:02:43, carlosk wrote:
> On 2014/11/26 01:06:40, Charlie Reis (OOO until Dec 1) wrote:
> > This makes sense when called by CancelPending.
> > 
> > Are you planning to use this method for speculative RFHs as well?  In that
> case
> > I don't think we'll need to call SwapOut.  Either it was already swapped out
> > (and we didn't swap it in) or we created it from scratch and we can delete
it.
> 
> > (That can be a topic for the next CL, though.)
> 
> Yes, it should be a topic for the other CL.

Sounds good.

> 
> But at this point if the RFH was previously swapped out it did already went
> through the process of being swapped-in (at least I think that's what happens
in
> RFHM::CreateRenderFrame in the if-block beginning with:
> 
>   if (proxy && proxy->render_frame_host()) {
> 
> Isn't that so?

No, that block just deletes the proxy.  We don't actually change the state away
from STATE_SWAPPED_OUT until we get to the RFHI::Navigate call.

> 
> Also at this point we have no idea if the RFH was newly created or not.

Powered by Google App Engine
This is Rietveld 408576698