New issue
Advanced search Search tips
Starred by 7 users

Issue metadata

Status: Fixed
Closed: Nov 2
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Sign in to add a comment

Issue 844455: Chrome should not allow popups during page unloading

Reported by, May 18 2018 Project Member

Issue description

Comment 1 by, Aug 10

Had a meeting with Domenic and Timothy.

- We can probably do for || what we do for dialogs, not allow them when the event loop's termination nesting level is nonzero (see This should be a pretty simple spec change.
- The structure of the WPT would be an iframe that upon unload/beforeunload/hide tries to do a and put it into a variable on the parent. The parent then deletes/navigates the iframe and then can immediately check the variable to pass/fail.
- For implementation, we can reuse a lot of dialog code. For example, alert calls |ChromeClient::OpenJavaScriptAlert| which calls |ChromeClient::CanOpenModalIfDuringPageDismissal|. That's a great function that implements the check we want. It takes a parameter of |ChromeClient::DialogType| for logging purposes, so we'd want to extend that type (and rename it so it isn't entirely about "dialog"s with an enum meaning "a window", and then call it right before a

Comment 2 by, Aug 20

Labels: Target-70

Comment 3 by, Nov 2

Project Member
The following revision refers to this bug:

commit ba496ac30606b596aecf5608a1973e300f8e798b
Author: Avi Drissman <>
Date: Fri Nov 02 19:48:35 2018

Don't allow popups during page unloading times.

Precisely, this disallows them when the event loop's
termination nesting level is nonzero.

This is now part of the spec,

> The window open steps, given a string url, a string target, and a string features, are as follows:
> 1. If the event loop's termination nesting level is nonzero, return null.

BUG= 844455 

Change-Id: I85fb003063f5ed051049c7c263391835421902ac
Commit-Queue: Avi Drissman <>
Reviewed-by: Nate Chapin <>
Reviewed-by: Daniel Cheng <>
Cr-Commit-Position: refs/heads/master@{#605025}

Comment 4 by, Nov 2

Status: Fixed (was: Assigned)

Comment 5 by, Feb 19 (3 days ago)

 Issue 933153  has been merged into this issue.

Sign in to add a comment