New issue
Advanced search Search tips

Issue 695879 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

onbeforeunload from subframe doesn't restart hang timer

Project Member Reported by a...@chromium.org, Feb 24 2017

Issue description

RenderFrameHostImpl::JavaScriptDialogClosed uses is_waiting_for_beforeunload_ack_ as a proxy for whether we're in an onbeforeunload (e.g.

RenderFrameHostImpl::DispatchBeforeUnload sets is_waiting_for_beforeunload_ack_
RenderFrameHostImpl::DispatchBeforeUnload starts the beforeunload timer
RenderFrameHostImpl::DispatchBeforeUnload sends FrameMsg_BeforeUnload
The render frame sends back FrameHostMsg_RunBeforeUnloadConfirm
RenderFrameHostImpl::OnRunBeforeUnloadConfirm stops the hang monitor timeout
RenderFrameHostImpl::JavaScriptDialogClosed restarts the beforeunload timer )

The problem is that when we moved JavaScriptDialogClosed to the frame we didn't account for that. So if a subframe has an onbeforeunload handler, inside of JavaScriptDialogClosed, is_waiting_for_beforeunload_ack_ isn't set and the timer doesn't get restarted.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c51fb6ff84c5df9dc9ac379e7ab9e9780fd165b

commit 1c51fb6ff84c5df9dc9ac379e7ab9e9780fd165b
Author: avi <avi@chromium.org>
Date: Mon Feb 27 20:43:03 2017

Always restart the hung page timer after a beforeunload dialog.

If a beforeunload dialog is triggered in a subframe, using is_waiting_for_beforeunload_ack_ as a sign that we're running a beforeunload dialog doesn't work.

BUG= 695879 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2704383007
Cr-Commit-Position: refs/heads/master@{#453323}

[modify] https://crrev.com/1c51fb6ff84c5df9dc9ac379e7ab9e9780fd165b/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/1c51fb6ff84c5df9dc9ac379e7ab9e9780fd165b/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/1c51fb6ff84c5df9dc9ac379e7ab9e9780fd165b/content/browser/web_contents/web_contents_impl.cc

Comment 2 by a...@chromium.org, Feb 27 2017

Status: Fixed (was: Started)

Sign in to add a comment