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

Issue 1794513003: Don't rely on the pending NavigationEntry for location.replace. (Closed)

Created:
4 years, 9 months ago by Charlie Reis
Modified:
4 years, 9 months ago
Reviewers:
Avi (use Gerrit), nasko
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, blink-reviews, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, nasko, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't rely on the pending NavigationEntry for location.replace. This CL adds a should_replace_current_entry param to commit IPCs, and it ensures the WebDataSource is accurate on browser-initiated navigations. To keep the CL manageable, it does not yet change same-process location.replace navigations from EXISTING_PAGE to NEW_PAGE, though we want to do that as well. This goes further than the previous attempt and removes the old code that depended on the pending entry at commit time. This also corrects a bug where we were using the wrong pending entry to decide whether to replace in some cases. TBR=nasko (for IPC) BUG=317872, 593153 TEST=See bug 593153 for repro steps. CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/865ad44678b14ada619057ec2afb0d381f8c5ddd Cr-Commit-Position: refs/heads/master@{#381233}

Patch Set 1 #

Patch Set 2 : Remove old approach #

Patch Set 3 : Clean up and fix bug #

Patch Set 4 : Add test for 593153 #

Total comments: 2

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -64 lines) Patch
M content/browser/frame_host/navigation_controller_impl.h View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 2 3 4 4 chunks +14 lines, -17 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_browsertest.cc View 1 2 3 4 chunks +78 lines, -5 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 chunks +11 lines, -28 lines 0 comments Download
M content/test/test_render_frame_host.h View 2 chunks +6 lines, -0 lines 0 comments Download
M content/test/test_render_frame_host.cc View 5 chunks +19 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/site-per-process View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (9 generated)
Charlie Reis
Avi, can you review? This is a second attempt after https://codereview.chromium.org/1672373002 was reverted for causing ...
4 years, 9 months ago (2016-03-14 18:58:58 UTC) #3
Avi (use Gerrit)
https://codereview.chromium.org/1794513003/diff/60001/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (right): https://codereview.chromium.org/1794513003/diff/60001/content/browser/frame_host/navigation_controller_impl.cc#newcode857 content/browser/frame_host/navigation_controller_impl.cc:857: details->did_replace_entry = params.should_replace_current_entry; When we specify the error page ...
4 years, 9 months ago (2016-03-14 20:49:59 UTC) #4
Charlie Reis
https://codereview.chromium.org/1794513003/diff/60001/content/browser/frame_host/navigation_controller_impl.cc File content/browser/frame_host/navigation_controller_impl.cc (right): https://codereview.chromium.org/1794513003/diff/60001/content/browser/frame_host/navigation_controller_impl.cc#newcode857 content/browser/frame_host/navigation_controller_impl.cc:857: details->did_replace_entry = params.should_replace_current_entry; On 2016/03/14 20:49:59, Avi wrote: > ...
4 years, 9 months ago (2016-03-14 21:18:19 UTC) #5
Avi (use Gerrit)
On 2016/03/14 21:18:19, Charlie Reis (slow til 3-15) wrote: > NavigationControllerBrowserTest.ErrorPageReplacement That was the situation ...
4 years, 9 months ago (2016-03-15 00:11:31 UTC) #6
Charlie Reis
Thanks. I'll TBR Nasko for the frame_messages.h change, since it's the same as last time.
4 years, 9 months ago (2016-03-15 16:37:01 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1794513003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1794513003/80001
4 years, 9 months ago (2016-03-15 16:38:45 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 9 months ago (2016-03-15 16:43:18 UTC) #15
commit-bot: I haz the power
4 years, 9 months ago (2016-03-15 16:45:20 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/865ad44678b14ada619057ec2afb0d381f8c5ddd
Cr-Commit-Position: refs/heads/master@{#381233}

Powered by Google App Engine
This is Rietveld 408576698