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

Issue 138583003: Add back the code to PrerenderManager::PendingSwap to handle RenderViewCreated being called for a... (Closed)

Created:
6 years, 11 months ago by jam
Modified:
6 years, 11 months ago
Reviewers:
davidben, tburkard
CC:
chromium-reviews, davidben+watch_chromium.org, cbentzel+watch_chromium.org, tburkard+watch_chromium.org, joi+watch-content_chromium.org, gavinp+prer_chromium.org, dominich+watch_chromium.org, darin-cc_chromium.org, site-isolation-reviews_chromium.org
Visibility:
Public.

Description

Add back the code to PrerenderManager::PendingSwap to handle RenderViewCreated being called for a cross-site navigation. The two tests are from David's https://codereview.chromium.org/140073003. BUG=330735 R=davidben@chromium.org, tburkard@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245386

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 5

Patch Set 4 : get rid of second vector and add CHECK #

Patch Set 5 : fix clang #

Patch Set 6 : fix clang #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -24 lines) Patch
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 7 chunks +163 lines, -11 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 2 chunks +19 lines, -11 lines 4 comments Download
M chrome/browser/prerender/prerender_tracker.cc View 1 2 3 1 chunk +1 line, -0 lines 1 comment Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 chunks +5 lines, -0 lines 0 comments Download
M content/public/browser/render_view_host.h View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
jam
Note: PrerenderBrowserTest.PrerenderPageNewTabCrossProcess makes me see that RenderViewCreated is hit twice. However, the test still passes ...
6 years, 11 months ago (2014-01-16 02:11:11 UTC) #1
tburkard
LGTM Clarification: by RenderViewCreated "is hit twice", you mean once when it's called in the ...
6 years, 11 months ago (2014-01-16 05:46:43 UTC) #2
jam
On 2014/01/16 05:46:43, tburkard wrote: > LGTM > > Clarification: by RenderViewCreated "is hit twice", ...
6 years, 11 months ago (2014-01-16 06:39:48 UTC) #3
davidben
https://codereview.chromium.org/138583003/diff/140001/chrome/browser/prerender/prerender_tracker.h File chrome/browser/prerender/prerender_tracker.h (right): https://codereview.chromium.org/138583003/diff/140001/chrome/browser/prerender/prerender_tracker.h#newcode88 chrome/browser/prerender/prerender_tracker.h:88: std::vector<base::WeakPtr<PrerenderPendingSwapThrottle> > throttles; On 2014/01/16 06:39:48, jam wrote: > ...
6 years, 11 months ago (2014-01-16 18:06:00 UTC) #4
jam
m https://codereview.chromium.org/138583003/diff/140001/chrome/browser/prerender/prerender_tracker.h File chrome/browser/prerender/prerender_tracker.h (right): https://codereview.chromium.org/138583003/diff/140001/chrome/browser/prerender/prerender_tracker.h#newcode88 chrome/browser/prerender/prerender_tracker.h:88: std::vector<base::WeakPtr<PrerenderPendingSwapThrottle> > throttles; On 2014/01/16 18:06:00, David Benjamin ...
6 years, 11 months ago (2014-01-16 18:12:26 UTC) #5
jam
6 years, 11 months ago (2014-01-16 18:12:28 UTC) #6
davidben
Sorry, this is kind of a long comment. I don't know how to repro this ...
6 years, 11 months ago (2014-01-16 19:41:01 UTC) #7
davidben
To be clear, if I'm even right about this race, I think it still shouldn't ...
6 years, 11 months ago (2014-01-16 19:44:09 UTC) #8
jam
On 2014/01/16 19:44:09, David Benjamin wrote: > To be clear, if I'm even right about ...
6 years, 11 months ago (2014-01-16 20:28:12 UTC) #9
davidben
Oh, has this already landed? If not, LGTM. Yeah, if it's fine that a malicious ...
6 years, 11 months ago (2014-01-16 20:45:38 UTC) #10
davidben
> and this one can exist and *I think* this one can exist. :-)
6 years, 11 months ago (2014-01-16 20:46:23 UTC) #11
jam
https://codereview.chromium.org/138583003/diff/740002/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/138583003/diff/740002/chrome/browser/prerender/prerender_manager.cc#newcode1183 chrome/browser/prerender/prerender_manager.cc:1183: content::RenderViewHost* render_view_host) { On 2014/01/16 20:45:38, David Benjamin wrote: ...
6 years, 11 months ago (2014-01-16 20:50:34 UTC) #12
jam
6 years, 11 months ago (2014-01-17 00:10:11 UTC) #13
Message was sent while issue was closed.
On 2014/01/16 20:50:34, jam wrote:
>
https://codereview.chromium.org/138583003/diff/740002/chrome/browser/prerende...
> File chrome/browser/prerender/prerender_manager.cc (right):
> 
>
https://codereview.chromium.org/138583003/diff/740002/chrome/browser/prerende...
> chrome/browser/prerender/prerender_manager.cc:1183: content::RenderViewHost*
> render_view_host) {
> On 2014/01/16 20:45:38, David Benjamin wrote:
> > On 2014/01/16 18:12:26, jam wrote:
> > > On 2014/01/16 18:06:00, David Benjamin wrote:
> > > > Hrm. So, was the goal of this work to get rid of RenderViewHost
altogether
> > or
> > > > just remove the IO-thread level state and convert to RenderFrameHost
> later?
> > > 
> > > The latter. Eventually RenderViewCreated will be gone, but I have to work
in
> > > many small steps :) The first is removing IO thread usage of RV IDs.
> > > 
> > > > Because this is still using RenderViewHost. (I ask because I'm thinking
of
> > > doing
> > > > a follow-up that switches it to AboutToNavigateRenderView and avoids the
> > > > main_rfh_ids_ vector. But I didn't see a RenderFrame version.)
> > > 
> > 
> > Ah, okay. Would it be a problem and/or useful for you then if I switched it
to
> > AboutToNavigateRenderView to avoid the vector?
> 
> np to me, I was just trying to leave things in the same state before my
earlier
> change after your test showed me that RVCreated can be called twice.

my bad, the check wasn't there before. Let's see if it fires now.

Powered by Google App Engine
This is Rietveld 408576698