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

Issue 464593003: Don't swap out the old RenderFrameHost until the new one commits. (Closed)

Created:
6 years, 4 months ago by Charlie Reis
Modified:
6 years, 4 months ago
Reviewers:
clamy, nasko
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, davidben
Project:
chromium
Visibility:
Public.

Description

Don't swap out the old RenderFrameHost until the new one commits. This is a major cleanup of cross-process navigation that delays running the old render frame's unload handler until the new render frame has committed. As a result, there is no period of time when swapped out RenderFrameHosts are visible. Most cross-process navigations are no longer paused in the network stack (unless they require a transfer), and the WasSwappedOut IPC message is removed. The STATE_WAITING_FOR_COMMIT and STATE_WAITING_FOR_UNLOAD_ACK states in RenderViewHostImpl can also be removed. Overview doc with navigation timeline diagrams: https://docs.google.com/document/d/1nLUxn4nV5g0HVGf-n34us5kQ0-erE-7050lzpMSxa4Q/edit?usp=sharing BUG=402020 TEST=Unload handlers still run on cross-process navigations. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290828

Patch Set 1 #

Patch Set 2 : Remove CSRM #

Patch Set 3 : Fix tests #

Patch Set 4 : Remove logging statements #

Patch Set 5 : Rebase #

Patch Set 6 : Fix more tests #

Patch Set 7 : Fix more tests #

Patch Set 8 : Fix remaining tests. #

Patch Set 9 : Skip unnecessary transfers. #

Patch Set 10 : Major rebase #

Total comments: 15

Patch Set 11 : Update comment #

Patch Set 12 : Update tests #

Patch Set 13 : Rebase past PlzNavigate CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -901 lines) Patch
D content/browser/cross_site_request_manager.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -64 lines 0 comments Download
D content/browser/cross_site_request_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -42 lines 0 comments Download
M content/browser/frame_host/cross_site_transferring_request.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -10 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +15 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -11 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +3 lines, -22 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +8 lines, -56 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +82 lines, -152 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +41 lines, -354 lines 0 comments Download
M content/browser/loader/cross_site_resource_handler.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -9 lines 0 comments Download
M content/browser/loader/cross_site_resource_handler.cc View 1 2 3 4 5 6 7 8 9 13 chunks +28 lines, -54 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +0 lines, -13 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +1 line, -27 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -58 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -4 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -4 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -11 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Charlie Reis
@nasko, @clamy: This is a big cleanup after making SwapOut asynchronous, which should simplify things ...
6 years, 4 months ago (2014-08-18 23:27:53 UTC) #1
clamy
Thanks! It looks a lot better and easier to understand that way. After a first ...
6 years, 4 months ago (2014-08-19 14:59:06 UTC) #2
Charlie Reis
On 2014/08/19 14:59:06, clamy wrote: > Thanks! It looks a lot better and easier to ...
6 years, 4 months ago (2014-08-19 16:26:04 UTC) #3
nasko
This is an awesome cleanup! Thanks for doing it! Just a few questions/nits. https://codereview.chromium.org/464593003/diff/200001/content/browser/frame_host/render_frame_host_manager_unittest.cc File ...
6 years, 4 months ago (2014-08-19 16:45:23 UTC) #4
Charlie Reis
Thanks! New patch uploaded. https://codereview.chromium.org/464593003/diff/200001/content/browser/frame_host/render_frame_host_manager_unittest.cc File content/browser/frame_host/render_frame_host_manager_unittest.cc (left): https://codereview.chromium.org/464593003/diff/200001/content/browser/frame_host/render_frame_host_manager_unittest.cc#oldcode884 content/browser/frame_host/render_frame_host_manager_unittest.cc:884: TEST_F(RenderFrameHostManagerTest, NavigateWithEarlyReNavigation) { On 2014/08/19 ...
6 years, 4 months ago (2014-08-19 21:20:32 UTC) #5
nasko
LGTM
6 years, 4 months ago (2014-08-19 21:39:01 UTC) #6
Charlie Reis
Great. @clamy, I've rebased to pick up your PlzNavigate CL, which didn't conflict much. If ...
6 years, 4 months ago (2014-08-19 23:39:29 UTC) #7
clamy
Thanks! LGTM.
6 years, 4 months ago (2014-08-20 11:19:25 UTC) #8
clamy
The CQ bit was checked by clamy@chromium.org
6 years, 4 months ago (2014-08-20 11:19:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/creis@chromium.org/464593003/260001
6 years, 4 months ago (2014-08-20 11:20:08 UTC) #10
commit-bot: I haz the power
Committed patchset #13 (260001) as 290828
6 years, 4 months ago (2014-08-20 13:18:00 UTC) #11
dglazkov
On 2014/08/20 at 13:18:00, commit-bot wrote: > Committed patchset #13 (260001) as 290828 Did this ...
6 years, 4 months ago (2014-08-20 19:51:18 UTC) #12
Charlie Reis
6 years, 4 months ago (2014-08-20 19:53:19 UTC) #13
Message was sent while issue was closed.
On 2014/08/20 19:51:18, dglazkov wrote:
> On 2014/08/20 at 13:18:00, commit-bot wrote:
> > Committed patchset #13 (260001) as 290828
> 
> Did this change cause
>
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40...

Yes, but we've already disabled the test in http://crbug.com/405582.

Powered by Google App Engine
This is Rietveld 408576698