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

Issue 2735183003: PlzNavigate: stop navigations when opening a document for write (Closed)

Created:
3 years, 9 months ago by clamy
Modified:
3 years, 9 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, sof, creis+watch_chromium.org, Peter Beverloo, eae+blinkwatch, nasko+codewatch_chromium.org, jam, blink-reviews-api_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, darin-cc_chromium.org, blink-reviews, blink-reviews-frames_chromium.org, kinuko+watch, jochen+watch_chromium.org, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: stop navigations when opening a document for write This CL ensures that we stop renderer-initiated navigations when attempting to do a document write. In order to do this in PlzNavigate, we introduce a new IPC where the RenderFrame asks the browser process to drop its renderer-initiated request. The CL also fixes an issue with the cancellation of renderer-initiated navigations in PlzNavigate. We issued a Stop IPC that would stop all loaders. Instead, we now have a new IPC that will only cancel the dummy provisional DocumentLoader that keeps track of navigations handled by the browser process. BUG=576261 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2735183003 Cr-Commit-Position: refs/heads/master@{#459081} Committed: https://chromium.googlesource.com/chromium/src/+/a86695ba7e713a92a517631681c549f74871a747

Patch Set 1 #

Total comments: 9

Patch Set 2 : Added an id to avoid race conditions #

Patch Set 3 : Rebase #

Total comments: 4

Patch Set 4 : Rebase #

Patch Set 5 : Addressed comments #

Patch Set 6 : Rebase #

Total comments: 12

Patch Set 7 : Removed the DroppedNavigation IPC part #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase + fixed compilation error #

Total comments: 6

Patch Set 10 : Rebase #

Patch Set 11 : Addressed commemts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -31 lines) Patch
M content/browser/frame_host/frame_tree_node.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +9 lines, -5 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigator.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -3 lines 0 comments Download
M content/browser/frame_host/navigator_impl.h View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 3 chunks +17 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +13 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M content/test/test_render_frame_host.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/test/test_web_contents.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameClient.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFrameClientImpl.cpp View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 55 (34 generated)
clamy
@nasko, japhet: PTAL
3 years, 9 months ago (2017-03-07 17:36:36 UTC) #5
Nate Chapin
https://codereview.chromium.org/2735183003/diff/1/content/common/frame_messages.h File content/common/frame_messages.h (right): https://codereview.chromium.org/2735183003/diff/1/content/common/frame_messages.h#newcode892 content/common/frame_messages.h:892: IPC_MESSAGE_ROUTED0(FrameMsg_DroppedNavigation) Are there any race conditions that could lead ...
3 years, 9 months ago (2017-03-07 18:39:08 UTC) #7
nasko
https://codereview.chromium.org/2735183003/diff/1/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/2735183003/diff/1/content/browser/frame_host/frame_tree_node.cc#newcode429 content/browser/frame_host/frame_tree_node.cc:429: new FrameMsg_DroppedNavigation(current_frame_host()->GetRoutingID())); Hmm, why use the new IPC here? ...
3 years, 9 months ago (2017-03-09 05:19:28 UTC) #10
clamy
https://codereview.chromium.org/2735183003/diff/1/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/2735183003/diff/1/content/browser/frame_host/frame_tree_node.cc#newcode429 content/browser/frame_host/frame_tree_node.cc:429: new FrameMsg_DroppedNavigation(current_frame_host()->GetRoutingID())); On 2017/03/09 05:19:28, nasko (slow) wrote: > ...
3 years, 9 months ago (2017-03-13 13:55:57 UTC) #11
clamy
@nasko: I have uploaded a version with an id to avoid race conditions. Wdyt? https://codereview.chromium.org/2735183003/diff/1/content/shell/test_runner/test_runner.cc ...
3 years, 9 months ago (2017-03-14 16:40:20 UTC) #18
Nate Chapin
blink lgtm
3 years, 9 months ago (2017-03-14 16:51:02 UTC) #21
clamy
@nasko: if you have time, could you take a brief look to see if this ...
3 years, 9 months ago (2017-03-16 15:08:35 UTC) #22
nasko
The main issue is that this reminds me a bit about page_id, which we were ...
3 years, 9 months ago (2017-03-16 21:23:15 UTC) #24
Charlie Reis
On 2017/03/16 21:23:15, nasko (slow) wrote: > The main issue is that this reminds me ...
3 years, 9 months ago (2017-03-17 00:06:21 UTC) #25
clamy
Thanks! https://codereview.chromium.org/2735183003/diff/40001/content/common/navigation_params.h File content/common/navigation_params.h (right): https://codereview.chromium.org/2735183003/diff/40001/content/common/navigation_params.h#newcode183 content/common/navigation_params.h:183: // -1 is this navigation wasn't renderer-initiated. On ...
3 years, 9 months ago (2017-03-17 15:19:12 UTC) #32
Charlie Reis
Thanks for clarifying. I'd still really prefer not to add this ID if possible, since ...
3 years, 9 months ago (2017-03-20 06:34:44 UTC) #35
clamy
As I said before, I'm really not happy about adding an id, as there is ...
3 years, 9 months ago (2017-03-20 14:56:22 UTC) #36
Charlie Reis
Thanks for the explanations! I do appreciate your goals, and I'm just hoping to have ...
3 years, 9 months ago (2017-03-20 23:02:50 UTC) #37
clamy
I've split the patchset, which now contains only the fix for the document.open case. Note ...
3 years, 9 months ago (2017-03-22 14:28:12 UTC) #40
Charlie Reis
Thanks, LGTM now that we don't have the extra reply coming back. We can discuss ...
3 years, 9 months ago (2017-03-22 23:54:41 UTC) #43
clamy
Thanks! https://codereview.chromium.org/2735183003/diff/160001/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/2735183003/diff/160001/content/browser/frame_host/frame_tree_node.cc#newcode424 content/browser/frame_host/frame_tree_node.cc:424: // informed that the navigation stopped. On 2017/03/22 ...
3 years, 9 months ago (2017-03-23 13:17:52 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2735183003/200001
3 years, 9 months ago (2017-03-23 13:18:43 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/392799)
3 years, 9 months ago (2017-03-23 13:25:26 UTC) #49
nasko
IPC LGTM
3 years, 9 months ago (2017-03-23 13:27:04 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2735183003/200001
3 years, 9 months ago (2017-03-23 13:27:41 UTC) #52
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 14:46:43 UTC) #55
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/a86695ba7e713a92a517631681c5...

Powered by Google App Engine
This is Rietveld 408576698