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

Issue 903043002: Skip BeforeUnload on cross-site navigations when there are no handlers

Created:
5 years, 10 months ago by clamy
Modified:
5 years, 10 months ago
Reviewers:
Charlie Reis, carlosk
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Skip BeforeUnload on cross-site navigations when there are no handlers This CL removes the IPC roundtrip where the browser waits for the renderer to execute the BeforeUnload event when there are no beforeUnload handlers registered for the frame. BUG=365039

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 8

Patch Set 7 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -29 lines) Patch
M content/browser/frame_host/navigator_impl_unittest.cc View 1 2 3 4 5 6 5 chunks +29 lines, -10 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 2 chunks +13 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 11 chunks +44 lines, -16 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
clamy
@creis: PTAL @carlosk: FYI This is the CL to skip waiting beforeUnload when there are ...
5 years, 10 months ago (2015-02-16 17:43:53 UTC) #2
carlosk
Cool with just one minor suggestion. https://codereview.chromium.org/903043002/diff/100001/content/browser/web_contents/web_contents_impl_unittest.cc File content/browser/web_contents/web_contents_impl_unittest.cc (right): https://codereview.chromium.org/903043002/diff/100001/content/browser/web_contents/web_contents_impl_unittest.cc#newcode1006 content/browser/web_contents/web_contents_impl_unittest.cc:1006: Suggestion: split it ...
5 years, 10 months ago (2015-02-17 12:52:09 UTC) #3
Charlie Reis
LGTM with nits. https://codereview.chromium.org/903043002/diff/100001/content/browser/frame_host/navigator_impl_unittest.cc File content/browser/frame_host/navigator_impl_unittest.cc (left): https://codereview.chromium.org/903043002/diff/100001/content/browser/frame_host/navigator_impl_unittest.cc#oldcode275 content/browser/frame_host/navigator_impl_unittest.cc:275: main_test_rfh()->SendBeforeUnloadACK(true); We should include a PlzNavigate ...
5 years, 10 months ago (2015-02-17 23:04:31 UTC) #4
clamy
Thanks! https://codereview.chromium.org/903043002/diff/100001/content/browser/frame_host/navigator_impl_unittest.cc File content/browser/frame_host/navigator_impl_unittest.cc (left): https://codereview.chromium.org/903043002/diff/100001/content/browser/frame_host/navigator_impl_unittest.cc#oldcode275 content/browser/frame_host/navigator_impl_unittest.cc:275: main_test_rfh()->SendBeforeUnloadACK(true); On 2015/02/17 23:04:31, Charlie Reis wrote: > ...
5 years, 10 months ago (2015-02-18 13:27:23 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/903043002/120001
5 years, 10 months ago (2015-02-18 13:28:27 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/26482)
5 years, 10 months ago (2015-02-18 14:26:16 UTC) #10
Charlie Reis
5 years, 10 months ago (2015-02-19 00:33:44 UTC) #11
Thanks for the test.

Looks like there may be some WebNavigationApiTest failures?  Otherwise still
LGTM.

https://codereview.chromium.org/903043002/diff/100001/content/browser/frame_h...
File content/browser/frame_host/navigator_impl_unittest.cc (left):

https://codereview.chromium.org/903043002/diff/100001/content/browser/frame_h...
content/browser/frame_host/navigator_impl_unittest.cc:275:
main_test_rfh()->SendBeforeUnloadACK(true);
On 2015/02/18 13:27:23, clamy wrote:
> On 2015/02/17 23:04:31, Charlie Reis wrote:
> > We should include a PlzNavigate test for the case that a beforeunload
handler
> is
> > present as well.
> 
> I added a test to check that we properly wait before starting the navigation
if
> a handler is present as well.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698