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

Issue 1890493002: PlzNavigate: properly execute BeforeUnload on renderer initiated navigations (Closed)

Created:
4 years, 8 months ago by clamy
Modified:
4 years, 6 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, Charlie Reis, darin-cc_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, jam, Nate Chapin, kinuko+watch, loading-reviews_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PlzNavigate: properly execute BeforeUnload on renderer initiated navigations This CL ensures that the BeforeUnload event is always properly executed before starting a renderer-initiated navigation when browser-side-navigation is enabled. BUG=608371, 475027 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/bfd6a8144791f47eefb45961819c6f3472035506 Cr-Commit-Position: refs/heads/master@{#396737}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 14

Patch Set 5 : Rebase #

Patch Set 6 : Now only calling BeforeUnload from the embedder #

Total comments: 7

Patch Set 7 : Rebase #

Patch Set 8 : Rebase #

Patch Set 9 : Addressed dcheng's comments #

Total comments: 6

Patch Set 10 : Rebase #

Patch Set 11 : Addressed dcheng's comments #

Total comments: 14

Patch Set 12 : Rebase #

Patch Set 13 : Addressed comments #

Total comments: 2

Patch Set 14 : Rebase #

Patch Set 15 : Rebase + fixed issue with layout test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -60 lines) Patch
M components/test_runner/test_runner_for_specific_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -1 line 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -2 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 13 14 2 chunks +5 lines, -2 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 13 2 chunks +4 lines, -2 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 13 4 chunks +6 lines, -4 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 13 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +23 lines, -6 lines 0 comments Download
M testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/WebRemoteFrameImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/public/web/WebFrame.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/public/web/WebLocalFrame.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (16 generated)
clamy
@nasko: PTAL.
4 years, 8 months ago (2016-04-15 12:06:05 UTC) #3
nasko
Adding dcheng@ for blink review and a question about ordering of events. https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc ...
4 years, 8 months ago (2016-04-15 14:42:22 UTC) #5
clamy
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/15 14:42:22, nasko (very slow Apr ...
4 years, 8 months ago (2016-04-15 14:45:54 UTC) #6
dcheng
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/15 at 14:45:54, clamy wrote: > ...
4 years, 8 months ago (2016-04-15 17:21:43 UTC) #7
clamy
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/15 17:21:42, dcheng wrote: > On ...
4 years, 8 months ago (2016-04-25 11:36:55 UTC) #8
dcheng
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/25 at 11:36:55, clamy wrote: > ...
4 years, 8 months ago (2016-04-26 06:32:31 UTC) #9
clamy
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/26 06:32:31, dcheng wrote: > On ...
4 years, 8 months ago (2016-04-26 10:07:09 UTC) #10
dcheng
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/26 at 10:07:09, clamy wrote: > ...
4 years, 7 months ago (2016-04-27 09:21:29 UTC) #11
clamy
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/27 09:21:29, dcheng wrote: > On ...
4 years, 7 months ago (2016-04-27 11:29:27 UTC) #12
dcheng
https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/60001/content/renderer/render_frame_impl.cc#newcode4870 content/renderer/render_frame_impl.cc:4870: : blink::WebNavigationPolicyIgnore; On 2016/04/27 at 11:29:27, clamy wrote: > ...
4 years, 7 months ago (2016-04-27 13:42:04 UTC) #13
clamy
Thanks! I have uploaded a new version where the embedder triggers BeforeUnload in decidePolicyForNavigation, whether ...
4 years, 7 months ago (2016-04-29 12:18:24 UTC) #14
dcheng
Sorry for the delay on the review… almost caught up now… https://codereview.chromium.org/1890493002/diff/100001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (left): ...
4 years, 7 months ago (2016-05-03 06:51:59 UTC) #16
clamy
Thanks! https://codereview.chromium.org/1890493002/diff/100001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (left): https://codereview.chromium.org/1890493002/diff/100001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#oldcode1391 third_party/WebKit/Source/core/loader/FrameLoader.cpp:1391: if (!shouldClose(navigationType == NavigationTypeReload)) On 2016/05/03 06:51:58, dcheng ...
4 years, 7 months ago (2016-05-03 13:17:09 UTC) #17
dcheng
https://codereview.chromium.org/1890493002/diff/160001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/160001/content/renderer/render_frame_impl.cc#newcode1518 content/renderer/render_frame_impl.cc:1518: // TODO(clamy): Pass the right value for is_reload here. ...
4 years, 7 months ago (2016-05-03 21:34:31 UTC) #18
clamy
Thanks! https://codereview.chromium.org/1890493002/diff/160001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/160001/content/renderer/render_frame_impl.cc#newcode1518 content/renderer/render_frame_impl.cc:1518: // TODO(clamy): Pass the right value for is_reload ...
4 years, 7 months ago (2016-05-04 13:50:16 UTC) #20
dcheng
//third_party/WebKit LGTM https://codereview.chromium.org/1890493002/diff/200001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890493002/diff/200001/content/renderer/render_frame_impl.cc#newcode1523 content/renderer/render_frame_impl.cc:1523: return; It's probably slightly safer (and consistent ...
4 years, 7 months ago (2016-05-04 18:41:35 UTC) #21
clamy
@nasko: can you PTAL at the changes in content? Note: I'll be addressing dcheng's comment ...
4 years, 7 months ago (2016-05-09 08:26:55 UTC) #22
nasko
Mostly nits, but the test_runner change doesn't look safe. Adding lukasza@ for guidance on that ...
4 years, 7 months ago (2016-05-09 21:56:04 UTC) #24
Łukasz Anforowicz
https://codereview.chromium.org/1890493002/diff/200001/components/test_runner/test_runner_for_specific_view.cc File components/test_runner/test_runner_for_specific_view.cc (right): https://codereview.chromium.org/1890493002/diff/200001/components/test_runner/test_runner_for_specific_view.cc#newcode562 components/test_runner/test_runner_for_specific_view.cc:562: return web_view()->mainFrame()->toWebLocalFrame()->dispatchBeforeUnloadEvent( On 2016/05/09 21:56:04, nasko (slow) wrote: > ...
4 years, 7 months ago (2016-05-09 22:43:23 UTC) #25
clamy
Thanks! https://codereview.chromium.org/1890493002/diff/200001/components/test_runner/test_runner_for_specific_view.cc File components/test_runner/test_runner_for_specific_view.cc (right): https://codereview.chromium.org/1890493002/diff/200001/components/test_runner/test_runner_for_specific_view.cc#newcode562 components/test_runner/test_runner_for_specific_view.cc:562: return web_view()->mainFrame()->toWebLocalFrame()->dispatchBeforeUnloadEvent( On 2016/05/09 22:43:23, Łukasz Anforowicz wrote: ...
4 years, 7 months ago (2016-05-10 00:39:56 UTC) #26
clamy
https://codereview.chromium.org/1890493002/diff/200001/components/test_runner/test_runner_for_specific_view.cc File components/test_runner/test_runner_for_specific_view.cc (right): https://codereview.chromium.org/1890493002/diff/200001/components/test_runner/test_runner_for_specific_view.cc#newcode562 components/test_runner/test_runner_for_specific_view.cc:562: return web_view()->mainFrame()->toWebLocalFrame()->dispatchBeforeUnloadEvent( On 2016/05/10 00:39:56, clamy wrote: > On ...
4 years, 7 months ago (2016-05-10 01:58:09 UTC) #27
dcheng
(Sorry to make your life complicated =) https://codereview.chromium.org/1890493002/diff/240001/components/test_runner/test_runner_for_specific_view.cc File components/test_runner/test_runner_for_specific_view.cc (right): https://codereview.chromium.org/1890493002/diff/240001/components/test_runner/test_runner_for_specific_view.cc#newcode570 components/test_runner/test_runner_for_specific_view.cc:570: CHECK(false) << ...
4 years, 7 months ago (2016-05-10 04:55:04 UTC) #28
dcheng
On 2016/05/10 at 04:55:04, dcheng wrote: > (Sorry to make your life complicated =) > ...
4 years, 7 months ago (2016-05-10 04:59:35 UTC) #29
clamy
@nasko: ping now that you're back.
4 years, 7 months ago (2016-05-25 16:51:21 UTC) #30
nasko
content/ LGTM, though you likely need to rebase the patch.
4 years, 7 months ago (2016-05-25 17:24:02 UTC) #31
clamy
Thanks! @blundell: PTAL at the changes in components/ https://codereview.chromium.org/1890493002/diff/240001/components/test_runner/test_runner_for_specific_view.cc File components/test_runner/test_runner_for_specific_view.cc (right): https://codereview.chromium.org/1890493002/diff/240001/components/test_runner/test_runner_for_specific_view.cc#newcode570 components/test_runner/test_runner_for_specific_view.cc:570: CHECK(false) ...
4 years, 7 months ago (2016-05-26 09:43:54 UTC) #34
blundell
An OWNER of //components/test_runner would be a better reviewer here (in general, prefer sending reviews ...
4 years, 7 months ago (2016-05-26 09:50:02 UTC) #35
clamy
@rbyers: PTAL at the changes in components/test_runner
4 years, 7 months ago (2016-05-26 09:56:25 UTC) #37
Rick Byers
On 2016/05/26 09:56:25, clamy wrote: > @rbyers: PTAL at the changes in components/test_runner components/test_runner/ LGTM
4 years, 7 months ago (2016-05-26 13:32:57 UTC) #38
clamy
Thanks!
4 years, 7 months ago (2016-05-26 13:36:33 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1890493002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1890493002/260001
4 years, 7 months ago (2016-05-26 13:36:52 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/234395)
4 years, 7 months ago (2016-05-26 15:14:10 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1890493002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1890493002/280001
4 years, 6 months ago (2016-05-30 14:59:08 UTC) #47
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 6 months ago (2016-05-30 16:25:33 UTC) #49
commit-bot: I haz the power
4 years, 6 months ago (2016-05-30 16:27:14 UTC) #51
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/bfd6a8144791f47eefb45961819c6f3472035506
Cr-Commit-Position: refs/heads/master@{#396737}

Powered by Google App Engine
This is Rietveld 408576698