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

Issue 2738943002: Move beforeunload hang timer duties to its own timer. (Closed)

Created:
3 years, 9 months ago by Avi (use Gerrit)
Modified:
3 years, 9 months ago
Reviewers:
Charlie Reis, dtapuska
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move beforeunload hang timer duties to its own timer. 1. Just because a beforeunload dialog was closed, it doesn't mean that the frame necessarily was waiting for a beforeunload ack. (If navigation happened in the renderer entirely, it could decide to run beforeunload without the browser knowing; the whole "waiting for beforeunload ack" deal is in the situation where the browser forces the page to run a beforeunload handler if it has one.) Thus blindly restarting the beforeunload ack timer just because it was a beforeunload dialog was wrong. Thus this reverts r453323. 2. r453323 was trying to address a real problem: what if the parent frame was waiting for a beforeunload ack but the child frame had the beforeunload handler and showed the dialog? But the problem is more general, as _any_ parent frame could have been asked to run beforeunload handlers and could have an ack pending. So that's what's with the walking up the frame tree to both suspend the timer when the dialog is shown, and to resume it when the dialog is closed. BUG=418266 TEST=no user-visible change CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2738943002 Cr-Commit-Position: refs/heads/master@{#457223} Committed: https://chromium.googlesource.com/chromium/src/+/2d7d2c3632187e2cfaaa5c6ec26d3adb3ae784b0

Patch Set 1 #

Patch Set 2 : rebase on top of another cl landing soon #

Patch Set 3 : rebase to tot #

Patch Set 4 : rebase #

Total comments: 13

Patch Set 5 : with test #

Total comments: 10

Patch Set 6 : better test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -57 lines) Patch
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 3 chunks +8 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 7 chunks +37 lines, -32 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl_browsertest.cc View 1 2 3 4 5 2 chunks +125 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 3 chunks +1 line, -14 lines 0 comments Download

Messages

Total messages: 43 (29 generated)
Avi (use Gerrit)
This is a relanding of https://codereview.chromium.org/2727253005/. It's a combination of that CL, a revert of ...
3 years, 9 months ago (2017-03-08 23:02:24 UTC) #4
Charlie Reis
On 2017/03/08 23:02:24, Avi wrote: > This is a relanding of https://codereview.chromium.org/2727253005/. It's a > ...
3 years, 9 months ago (2017-03-09 00:51:34 UTC) #7
Avi (use Gerrit)
On 2017/03/09 00:51:34, Charlie Reis (OOO til Mar 8) wrote: > On 2017/03/08 23:02:24, Avi ...
3 years, 9 months ago (2017-03-09 02:27:43 UTC) #8
Charlie Reis
Thanks for the more detailed explanation-- that helps! Can you summarize that in the CL ...
3 years, 9 months ago (2017-03-14 17:19:28 UTC) #21
Avi (use Gerrit)
https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode1701 content/browser/frame_host/render_frame_host_impl.cc:1701: // Stop any timers that are waiting. On 2017/03/14 ...
3 years, 9 months ago (2017-03-14 20:52:03 UTC) #23
Avi (use Gerrit)
https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode1703 content/browser/frame_host/render_frame_host_impl.cc:1703: if (frame->is_waiting_for_beforeunload_ack_) FYI, before OldSpice, alerts were serialized in ...
3 years, 9 months ago (2017-03-14 20:58:58 UTC) #24
Avi (use Gerrit)
https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode2626 content/browser/frame_host/render_frame_host_impl.cc:2626: if (frame->is_waiting_for_beforeunload_ack_) { ** this belongs to this thread ...
3 years, 9 months ago (2017-03-14 21:03:14 UTC) #25
Avi (use Gerrit)
Charlie: You were worried about some other call to RenderFrameHostImpl::JavaScriptDialogClosed restarting timers that they shouldn't. ...
3 years, 9 months ago (2017-03-15 01:17:00 UTC) #28
Charlie Reis
Thanks. LGTM with the changes below. https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode2626 content/browser/frame_host/render_frame_host_impl.cc:2626: if (frame->is_waiting_for_beforeunload_ack_) { ...
3 years, 9 months ago (2017-03-15 17:22:03 UTC) #31
Avi (use Gerrit)
https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode2626 content/browser/frame_host/render_frame_host_impl.cc:2626: if (frame->is_waiting_for_beforeunload_ack_) { On 2017/03/15 17:22:02, Charlie Reis (slow) ...
3 years, 9 months ago (2017-03-15 19:57:38 UTC) #32
Charlie Reis
Thanks! LGTM. https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2738943002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode2626 content/browser/frame_host/render_frame_host_impl.cc:2626: if (frame->is_waiting_for_beforeunload_ack_) { On 2017/03/15 19:57:38, Avi ...
3 years, 9 months ago (2017-03-15 21:34:20 UTC) #37
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/2738943002/100001
3 years, 9 months ago (2017-03-15 21:36:54 UTC) #39
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/2d7d2c3632187e2cfaaa5c6ec26d3adb3ae784b0
3 years, 9 months ago (2017-03-15 21:57:00 UTC) #42
Nico
3 years, 9 months ago (2017-03-27 18:45:03 UTC) #43
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/2782443002/ by thakis@chromium.org.

The reason for reverting is: Speculative, might have caused
https://crbug.com/705306.

Powered by Google App Engine
This is Rietveld 408576698